How to Calculate Profit Margin: Formula and Examples

How to calculate profit margin: gross margin 45%, operating margin 15% and net margin 11% on $80,000 of sales
How to calculate profit margin: gross margin 45%, operating margin 15% and net margin 11% on $80,000 of sales

Last updated 17 November 2026 · 10 min read

Knowing how to calculate profit margin shows you how much of every dollar you sell turns into profit, and it is the first number to check when your business feels busy but your bank balance does not. The profit margin formula is simple: divide a profit figure by your revenue and multiply by 100. The result is your profit margin percentage.

There are three versions of it: gross profit margin, operating profit margin and net profit margin. This guide explains each one, shows how to calculate profit margin for a single product and for a whole business, and gives you the numbers to check your own results. You can also test your figures with the free BizFinDesk profit margin calculator.

The short answer: here is how to calculate profit margin in one line: profit margin percentage = (profit ÷ revenue) × 100. Use gross profit for the gross margin, operating profit for the operating margin, and net profit for the net margin.

Key takeaways

  • Learning how to calculate profit margin starts with one rule: divide by revenue, not by cost. Dividing by cost gives you markup.
  • Gross margin ignores running costs, operating margin includes them, and net margin includes everything, interest and tax too.
  • The method follows the same steps every time, so you can use it for a product, a month or a year.
  • A good profit margin depends on your industry, so compare yours with your own past results first.

What Is Profit Margin?

Profit margin is the share of your revenue that you keep as profit, shown as a percentage. A 30% profit margin means you keep 30 cents of every dollar of sales. It is not the same as profit. Profit is an amount of money, and profit margin is that amount as a percentage of revenue. That is what lets you compare different months, products and businesses of different sizes.

Margin is also not the same as markup. Markup divides profit by cost, while margin divides it by revenue, so the same sale always shows a smaller margin than markup. Our guide to margin vs markup explains the difference in detail.

The Profit Margin Formula: How to Calculate Profit Margin Step by Step

Every version follows the same three steps. Xero’s profit margin guide sets out the same gross, operating and net formulas from an accounting point of view.

  1. Choose the profit you want to measure: gross, operating or net.
  2. Divide that profit by your revenue for the same period.
  3. Multiply by 100 to get your profit margin percentage.

The three formulas are:

  • Gross profit margin = (revenue − cost of goods sold) ÷ revenue × 100
  • Operating profit margin = (revenue − cost of goods sold − operating expenses) ÷ revenue × 100
  • Net profit margin = (revenue − all costs, including interest and tax) ÷ revenue × 100

Cost of goods sold, or COGS, covers the direct cost of making or buying what you sell, such as materials, packaging and inbound shipping. Operating expenses are your running costs, such as rent, wages, marketing and software. Interest and tax are the last costs taken off before you reach net profit.

How to Calculate Profit Margin for a Single Product

Start with a simple case. A jacket sells for $120 and costs you $78 to buy.

  1. Profit = $120 − $78 = $42
  2. Divide by revenue: $42 ÷ $120 = 0.35
  3. Multiply by 100: 35%

The margin on this jacket is 35%. Because only the direct cost is used, this is also its gross margin. For comparison, the markup is $42 ÷ $78 = 53.8%, which is a bigger number for the same sale.

Now see what a discount does. If you sell the jacket at 20% off, the price is $96 and the profit falls to $18, so the margin falls from 35% to 18.75%. That is why it pays to know how to calculate profit margin before you run a sale. Our guide on how discounts affect profit shows how many extra sales you would need.

How to Calculate Profit Margin for a Whole Business

Now take an online clothing shop with these figures for a year: revenue of $80,000, cost of goods sold of $44,000, operating expenses of $24,000, and interest and tax of $3,200.

StepCalculationResult
Gross profit$80,000 − $44,000$36,000
Gross margin$36,000 ÷ $80,000 × 10045%
Operating profit$36,000 − $24,000$12,000
Operating margin$12,000 ÷ $80,000 × 10015%
Net profit$12,000 − $3,200$8,800
Net margin$8,800 ÷ $80,000 × 10011%
Waterfall chart: $80,000 revenue becomes $36,000 gross profit, $12,000 operating profit and $8,800 net profit]

Out of every $1 of sales, the shop keeps 45 cents after product costs, 15 cents after running costs and 11 cents after interest and tax. That is how to calculate profit margin at each level of the income statement, and reading all three together tells you where the money goes.

Gross Profit Margin vs Operating Profit Margin vs Net Profit Margin

MarginWhat it includesWhat it tells you
Gross marginRevenue minus cost of goods soldHow profitable your products or services are
Operating marginAlso subtracts operating expensesHow well the core business runs
Net marginSubtracts every cost, including interest and taxWhat the business really keeps

Gross margin is always the highest of the three, and net margin is usually the lowest. The steps for how to calculate profit margin are the same for all three, and only the profit figure changes. A big drop between the gross and operating figures points to high running costs. A big drop between operating and net points to debt or heavy tax.

How to Calculate Profit Margin in Excel or Google Sheets

Here is how to calculate profit margin in a spreadsheet. Put revenue in cell B2 and cost in cell C2, then enter this formula in D2: =(B2-C2)/B2. Format the cell as a percentage. For a revenue of 120 and a cost of 78, it returns 35%. Copy the formula down the column to get the margin for every product. If you divide by C2 instead, you get markup, which is the mistake to avoid.

How to Calculate Profit Margin When You Know the Margin You Want

You can also work backwards from a target to find the price to charge. The formula is price = cost ÷ (1 − target margin).

If an item costs $42 and you want a 30% margin, the price is $42 ÷ 0.70 = $60. Check it: ($60 − $42) ÷ $60 = 30%. Do not just add 30% to the cost. $42 × 1.30 = $54.60, which gives a margin of only 23.1%. The markup vs margin calculator converts one into the other for you.

What Is a Good Profit Margin?

There is no single answer, because margins vary widely by industry. NYU Stern’s industry margin data, updated in January 2026, lists net margins for US listed companies. They range from about 1.3% for auto and truck makers and 2.5% for air transport, to about 3.9% for apparel, 7.4% for building materials and 13.4% for soft drinks.

Once you know how to calculate profit margin, you need something to compare it with. Those figures are for large listed companies, so use them to see the range and not as a target for a small business. Owners often pay themselves in different ways, which changes reported net profit margin. Three comparisons are more useful for you:

  • Your own past periods. A falling margin is a warning even when profit in dollars is rising.
  • Similar businesses. Ask your trade association or accountant for typical figures in your sector.
  • Your own targets. Work out the net margin you need to reach your income goal.

How to Improve Your Profit Margin

  • Raise prices on products where demand is steady.
  • Cut the cost of goods sold through better supplier terms, bulk buying or cheaper packaging.
  • Reduce routine discounts. See how discounts affect profit before you run the next sale.
  • Sell more of your best-margin products and promote them first. Start by knowing how to calculate profit margin for each product, not just for the whole business.
  • Control running costs by reviewing subscriptions, rent and marketing spend every quarter.
  • Know your break-even point. Our guide on how to calculate break-even point shows how many sales you need to cover your costs.

Common Mistakes When You Calculate Profit Margin

Once you know how to calculate profit margin, these are the mistakes to avoid:

  1. Dividing by cost instead of revenue. That gives markup, not margin.
  2. Leaving out costs. Include payment fees, returns and your own pay in your costs.
  3. Mixing time periods. Use revenue and costs from the same month, quarter or year.
  4. Mixing tax treatments. Use revenue without VAT or sales tax, and costs on the same basis.
  5. Comparing the wrong margins. Do not compare your gross profit margin with another business’s net profit margin.
  6. Ignoring refunds and discounts. Use the price you actually received.
  7. Calculating it once. Recalculate whenever your prices or costs change.

How to Use the Free BizFinDesk Profit Margin Calculator

The profit margin calculator does the arithmetic for you. Use the online clothing shop figures to check it:

  1. Enter revenue of 80,000.
  2. Enter cost of goods sold of 44,000.
  3. Enter operating expenses of 24,000.
  4. Enter interest and tax of 3,200.
  5. Read the results: a gross profit of 36,000 and a gross margin of 45%, an operating profit of 12,000 and an operating margin of 15%, and a net profit of 8,800 and a net margin of 11%.

The calculator follows the same steps as how to calculate profit margin by hand. Change one number at a time, such as a lower cost of goods, to see which change improves your margin the most. The calculator works in any currency.

Frequently Asked Questions

Can you explain how to calculate profit margin in one sentence? Subtract your costs from your revenue to get profit, divide that profit by revenue, and multiply by 100.

What is the profit margin formula? Profit margin = (profit ÷ revenue) × 100. The profit you use decides whether you get the gross, operating or net version.

How do you calculate net profit margin? Subtract all costs, including operating expenses, interest and tax, from revenue to get net profit. Divide net profit by revenue and multiply by 100.

What is the difference between gross profit margin and operating profit margin? Gross margin only takes off the cost of goods sold. Operating margin also takes off running costs such as rent, wages and marketing.

Is profit margin the same as markup? No. Margin divides profit by revenue and markup divides profit by cost. A 50% markup is only a 33.3% margin.

How do I work out the profit margin percentage from price and cost? Subtract the cost from the price, divide by the price, and multiply by 100. A $120 price and a $78 cost give 35%.

What is a good gross profit margin? It depends on your industry and business model. Compare your gross margin with your own history and with similar businesses, not with a single universal number.

How to calculate profit margin in Excel? Divide profit by revenue with a formula such as =(B2-C2)/B2, where B2 is revenue and C2 is cost, then format the result as a percentage.

Can profit margin be negative? Yes. If your costs are higher than your revenue, your profit is negative and so is your profit margin.

Conclusion

You now know how to calculate profit margin: pick the profit you want to measure, divide it by revenue and multiply by 100. Check your gross, operating and net margins together, and use the profit margin formula to set prices as well as to review results. To test your own figures, use the free profit margin calculator.

This article is general information, not financial advice. Check your figures with a qualified adviser before making big decisions.

Share with