How to Calculate Profit Margin? The Formula for Gross & Net Margin and More

It’s simple: the bigger the profit margins, the better your business is doing. But is your profit margin really as large as it seems? The devil’s in the details - and we know exactly where to find them and how to improve them with a few simple calculations based on direct and indirect costs.

Arkadiusz Terpiłowski


Gestão financeira


What is profit margin and how to calculate it? Tips and examples


Receba dicas comprovadas sobre a optimização da carga de trabalho, entrega de projectos e finanças - mensalmente.

What is the profit margin? Definition 

Profit margin is a financial metric used to assess a company's profitability and efficiency in generating profit from its projects. It shows the percentage of revenue that remains as net profit after deducting all the costs and expenses associated with producing and selling goods or services. 

Profit margin formula

For profit margin calculator is not needed - to calculate profit margins, you need just simple calculations.

The general formula for calculating profit margins is:

Profit margin formula


  • Net Profit is the total revenue minus all costs, including all expenses, taxes, and interest.
  • Revenue refers to the total income generated from sales of goods or services.

The resulting profit percentage also indicates how much profit the company retains from each dollar of net income it generates and informs managers whether or not the correct situation in the business can create cash flow challenges for them to solve.

Types of profit margins 

While the basic profit margin formulas may seem simple, these calculations are much more complicated when we look at the specific varieties of profit margins. That includes:

Gross profit margin

Gross profit margin is a financial metric that measures the profitability of a company's core business activities by assessing how efficiently it produces goods or services. Unlike general profit margins, which consider all expenses, it focuses only on the direct costs of producing or purchasing the goods a company sells.

It is particularly useful for comparing the operational efficiency of companies in the same industry or sector. It helps in understanding how well a company controls its production costs and provides insights into pricing strategies and competitive positioning. 

Gross profit margin formula

The formula for gross profit margin is: 

Gross profit margin - example 

The Best Company has the following financial statistics for a given period:

  • Total Revenue (Net Sales): $500,000
  • Cost of Goods Sold (COGS): $200,000

To calculate the gross profit margin, we need to find the gross profit. In this case, it is: 

Gross Profit = Total Revenue - COGS = $500,000 - $200,000 = $300,000

Now, we can get to the point of our calculations:

Gross Margin = ($300,000 / $500,000) * 100 = 0.6 * 100 = 60%

In this example, The Best Company has a healthy result of 60%. This means that the company retains 60 cents as gross profit for every dollar of revenue generated after deducting the direct production costs (COGS).

Operating profit margin

Operating profit margin, or operating margin, is a financial metric that measures a company's profitability from its core business operations, excluding non-operating expenses such as interest and taxes. It provides insight into how well a company manages its day-to-day operational expenses relative to its revenue. It is also a crucial indicator of a company's operational efficiency and profitability, as it focuses on the main business activities' profitability without external factors. 

Operating profit margin formula

The formula for calculating this indicator is:

Operating profit margin formula


  • Operating Profit (Operating Income) is the profit earned from core business activities before deducting interest and taxes. It is calculated by subtracting operating expenses from gross profit.
  • Revenue refers to the total income generated from sales of goods or services.

Operating profit margin - example

Let's continue with The Best Company and calculate this KPI based on the given financial data:

  • Total Revenue (Sales): $500,000
  • Cost of Goods Sold (COGS): $200,000
  • Operating Costs: $100,000

We'll use the formula we defined above. But first, we need to find the operating profit:

Operating Profit = Gross Profit - Operating Costs

Operating Profit = ($500,000 - $200,000) - $100,000

Operating Profit = $300,000 - $100,000

Operating Profit = $200,000

Now, we can calculate the operating profit margin:

Operating Profit Margins = ($200,000 / $500,000) * 100 = 0.4 * 100 = 40%

In this example, The Best Company has an operating profit margin of 40%

Net profit margin

Net profit margins are a financial metric that measures the profitability of a company's overall operations after considering all expenses, including operating and non-operating expenses like interest and taxes. It provides a comprehensive view of a company's ability to generate profit from its total revenue.

Net profit margin formula

The formula is as follows:

Net profit margin formula


  • Net Profit is the total profit the company earns after deducting all expenses, including cost of goods sold (COGS), operating expenses, interest, and taxes, from the total revenue.
  • Revenue refers to the total income generated from sales of goods or services.

The resulting percentage represents the portion of revenue that remains as net profit after accounting for all costs and expenses

Net profit margin formula - example 

Let’s now calculate the net profit margin for The Best Company using the following data: 

  • Total Revenue (Sales): $500,000
  • Cost of Goods Sold (COGS): $200,000
  • Operating Expenses: $100,000
  • Interest Expenses: $10,000
  • Taxes: $50,000

First, we have to determine the net profit for the organization using the formula: 

Net Profit = Total Revenue - (COGS + Operating Expenses + Interest + Taxes)

In this case, the net profit is: 

Net Profit = $500,000 - ($200,000 + $100,000 + $10,000 + $50,000) = $500,000 - $360,000 = $140,000

Now, we can calculate the net profit margin using the formula from the previous section of this text. 

Net Profit Margin = ($140,000 / $500,000) * 100 = 0.28 * 100 = 28%

Profit margin degrees 

The calculations can be made even more accurate with more costs you include. That is what profit margin degrees are for. 

Typical degrees of profit margins include:

  • The first-degree margin related to all the expenses that generate your revenue directly (for example, the salaries, or their parts, of software developers in your team).
  • The second-degree margin based on secondary project costs, including overhead and indirect costs.
  • The third-degree margin subtracting administration, marketing and sales expenses, and company overheads from your revenue.
  • The fourth-degree margin including the costs of non-billable projects, bench, and time-offs. 

Only using the last type of margin, can you be sure that your operations are profitable and that there are no additional costs hiding in the Excel spreadsheets. 

Can I automate all these calculations? 

Not only you can do that, but you also should! 

With project accounting project profitability software, such as Primetric, your profit margin is automatically calculated based on: 

  • costs of work tracked in your company, 
  • costs of project and company overheads, 
  • any net income registered in the system.

As a result, thanks to Primetric you can get a bird’s eye view of your company’s finances in just seconds - for example, in a financial report, making a profit margin important part of an analysis of the company's financial health.

Profit margin shows the financial performance of the company in Primetric
A financial report in Primetric shows both incomes and expenses and calculates the net profit margins and margin for the entire company

What is a good profit margin? 

There is no single answer to this question, as the definition of “good profit margin” changes depending on the industry in question. 

In the services industry, a good profit margin of more than 20% is considered good. However, services as such might differ, too, adding more variations to the equation. 

While specific benchmarks may vary, most businesses typically have a healthy average net profit margin between 5% to 20%. However, this can be significantly higher or lower depending on the industry standards, business models, company size and growth stage, and current market conditions. 

How to improve the profit margins of a service company? 

Improving a company's profit margins involves a combination of strategies aimed at increasing revenue and optimizing costs. Here are some effective ways to achieve a higher profit margin:

  1. Increase selling prices: One straightforward approach is to increase the prices of your products or services or improve the accuracy of your pricing processes for fixed price projects. However, it's essential to conduct market research and ensure that the price increase is justified and won't negatively impact sales volume.
  2. Reduce the cost of goods sold (COGS): Look for ways to negotiate better deals with suppliers, optimize inventory management, and find more cost-effective sourcing options. Reducing the cost of goods sold will directly increase the gross profit margin.
  3. Improve operational efficiency: Streamline your business operations to eliminate wasteful practices, reduce production lead times, and improve capacity management processes to make the most of your employees’ time. 
  4. Control operating expenses: Analyze them thoroughly and identify areas where you can cut unnecessary costs without compromising on the quality of products or services. 
  5. Expand profitable product/service lines: Focus on promoting and expanding your most profitable products or services. Emphasizing high-margin offerings can boost overall profit margins.
  6. Upsell and cross-sell: Encourage customers to upgrade their purchases or buy additional complementary products or services, as this can increase the average transaction value and improve profitability.
  7. Focus on customer retention and loyalty: Retaining existing customers is generally more cost-effective than acquiring new ones. Loyal customers tend to make repeat purchases and refer others, contributing to higher profitability.

If you need some more specific ideas for your software development business, you can find them in our article on improving the profitability of IT companies

Alternatively, if you’re looking for some things you should avoid, read about common mistakes in project budgeting that can ruin your profit margins. 

Do you want to improve profitability even more? 

No problem - we have a few resources that will help you do so. 

Head straight to our blog and read about: 

Or, if you feel like you need to control any of these issues better, simply book a demo with one of our advisors and see how Primetric can help you do that! 

Arkadiusz Terpiłowski


Arkadiusz é Chefe de Crescimento e Co-fundador na Primetric. Antes disso, Arkadiusz esteve ao leme da sua própria empresa de desenvolvimento de software, onde supervisionou as operações. Um grande entusiasta da melhoria de processos, a sua missão pessoal é tornar as empresas de software mais rentáveis e eficientes no seu caminho para o crescimento.

Posts de blogues relacionados

É tão simples de começar, porquê esperar? 

Não limite o seu negócio com folhas de cálculo
que consomem tempo. Seja inteligente, trabalhe de forma mais inteligente.