How to Calculate Profit Margin (With Formula and Calculator)
Learn how to calculate profit margin with simple formulas and worked examples for gross, operating, and net margin. Includes a quick calculator method.
Profit margin tells you how much of every dollar you collect actually stays in the business after costs. It is the single fastest way to judge whether a company is healthy or just busy. A shop can post $2 million in sales and still be in trouble if almost all of it goes back out the door.
This guide shows you exactly how to calculate profit margin, walks through the three main types with real numbers, and gives you a quick calculator method you can run in your head.
The Short Answer: How Do I Calculate Profit Margin?
Profit margin is profit divided by revenue, expressed as a percentage. The universal formula is:
Profit Margin (%) = (Profit / Revenue) × 100
"Profit" changes depending on which margin you want, but the structure never does. You take some measure of profit, divide it by total revenue (your total sales before any deductions), and multiply by 100 to turn it into a percentage.
Example: if you earned $200,000 in revenue and kept $40,000 in profit, your margin is (40,000 / 200,000) × 100 = 20%. For every dollar of sales, you keep 20 cents.
That is the whole method. The rest of this guide is about choosing the right version of "profit" for the question you are trying to answer.
The Three Types of Profit Margin
There are three profit margins most businesses track, and each one strips out more costs than the last. Together they show you where money is being made - and where it is leaking.
1. Gross Profit Margin
Gross profit margin measures what is left after the direct cost of making or delivering your product, known as the cost of goods sold (COGS). COGS covers materials and direct labor - the costs that scale with each unit you sell.
Gross Profit Margin = ((Revenue − COGS) / Revenue) × 100
Say you run a furniture business. You sell $500,000 of tables and the wood, hardware, and workshop labor to build them cost $300,000.
- Gross profit = $500,000 − $300,000 = $200,000
- Gross margin = (200,000 / 500,000) × 100 = 40%
A healthy gross margin means your core product is priced well above what it costs to produce. If this number is thin, no amount of cost-cutting elsewhere will save you - the problem is in your pricing or your supplier costs.
2. Operating Profit Margin
Operating profit margin goes further and subtracts operating expenses too - rent, salaries, marketing, software, insurance, and other overhead needed to run the business day to day. It excludes interest and taxes, so it isolates how well the actual operation performs.
Operating Profit Margin = (Operating Income / Revenue) × 100
Continuing the furniture example: after the $200,000 gross profit, you spend $120,000 on rent, admin salaries, and marketing.
- Operating income = $200,000 − $120,000 = $80,000
- Operating margin = (80,000 / 500,000) × 100 = 16%
This is the number investors and lenders watch closely, because it shows whether the business model itself is profitable before financing and tax decisions muddy the picture.
3. Net Profit Margin
Net profit margin is the bottom line. It subtracts everything - COGS, operating expenses, interest, taxes, and any one-time charges - to show what you actually keep.
Net Profit Margin = (Net Income / Revenue) × 100
Take the $80,000 operating income, then pay $10,000 in loan interest and $14,000 in taxes.
- Net income = $80,000 − $10,000 − $14,000 = $56,000
- Net margin = (56,000 / 500,000) × 100 = 11.2%
Because net margin captures every cost, it is the most complete measure of profitability. When people ask "what's your profit margin?" without specifying, this is usually the one they mean. For a deeper breakdown of what each metric signals, see our guide on profit margin explained.
How to Calculate Gross Profit (the Dollar Figure)
Gross profit and gross profit margin are related but not the same, and the difference trips people up. Gross profit is a dollar amount; the margin is that same figure expressed as a percentage of revenue. Before you can find the margin, you need the raw number.
To calculate gross profit, subtract the cost of goods sold from your total revenue:
Gross Profit = Revenue − COGS
Only direct costs belong in COGS - the materials and labor that go into each unit you sell. Leave out rent, admin salaries, marketing, and other overhead; those come later, at the operating stage.
Using the furniture business again: $500,000 in sales minus $300,000 in wood, hardware, and workshop labor gives a gross profit of $200,000. That figure tells you how much cash your core product generates before the rest of the business takes its cut. Divide it by revenue and multiply by 100 and you have the gross margin - but the dollar amount alone is what you draw on to cover overhead and, ideally, still leave something over.
A Quick Calculator Method
You do not need software to run these numbers. Here is a repeatable, three-step calculator you can use with any figures:
- Pick your profit number. Decide which margin you want, then find the matching profit: gross (revenue − COGS), operating (after overhead), or net (after everything).
- Divide by revenue. Take that profit and divide it by total revenue.
- Multiply by 100. The result is your margin as a percentage.
Worked example: A consulting firm bills $250,000 for the year and keeps $75,000 after all costs.
- Step 1: Net profit = $75,000
- Step 2: 75,000 ÷ 250,000 = 0.30
- Step 3: 0.30 × 100 = 30% net profit margin
If you know your margin and want to work backward to a target profit, flip the formula: Profit = Revenue × (Margin / 100). At a 30% margin, $250,000 in revenue should produce $75,000 in profit - a fast sanity check on whether your books add up.
How to Calculate Gross Margin Step by Step
If pricing is the question keeping you up at night, gross margin is the number to isolate - it strips out overhead, interest, and taxes so you see purely whether each sale earns more than it costs to fulfill. Here is how to calculate gross margin on its own:
- Find your revenue. Use net sales for the period - total billings after any refunds and discounts.
- Add up your COGS. Sum only the direct costs of producing what you sold: raw materials, components, and the labor that goes straight into each unit. Leave out rent, admin salaries, and marketing.
- Subtract and divide. Gross profit is revenue minus COGS; divide that by revenue and multiply by 100.
Quick example: a coffee roaster sells $80,000 of beans in a quarter, and the green coffee plus roasting labor cost $30,000.
- Gross profit = $80,000 − $30,000 = $50,000
- Gross margin = (50,000 / 80,000) × 100 = 62.5%
That 62.5% is the cushion covering every other cost in the business. If it slips, either your input prices rose or your pricing hasn't kept up - and the fix is one of those two, not deeper cost-cutting downstream.
How to Calculate Margin on a Single Sale or Product
Everything above works at the company level, but you can calculate margin on one product, one order, or one invoice using the exact same logic. This is where margin becomes a pricing tool rather than a reporting one.
Take the selling price as your revenue and subtract the cost of that single item. Then divide by the selling price and multiply by 100:
Margin (%) = ((Selling Price − Cost) / Selling Price) × 100
Say you sell a product for $80 and it costs you $50 to source. Your margin is (($80 − $50) / $80) × 100 = 37.5%. Each unit keeps $30, or 37.5 cents on every dollar of that sale.
Running the numbers per product tells you which items actually carry your business and which ones you're practically giving away. A high-volume item with a 10% margin can earn less real money than a slow seller at 60%. Calculate margin on your top sellers first, and you'll quickly see where to raise prices or renegotiate costs.
Where to Find the Numbers
Every figure you need lives on your profit and loss statement. Revenue sits at the top, COGS comes next, operating expenses follow, and net income lands at the bottom. If your accounting is up to date, calculating any margin takes about two minutes.
If you do not have a formal P&L yet, you can pull the same data from invoices (revenue), supplier bills and direct labor (COGS), and your list of monthly overheads. Good accounting software calculates all three margins automatically, but knowing the math means you can spot errors and interpret the results instead of trusting a dashboard blindly.
What Counts as a Good Profit Margin?
There is no universal "good" number - margins vary enormously by industry. Grocery stores survive on net margins of 1-3% because they turn over huge volume. Software companies routinely clear 20% or more because their marginal cost per sale is tiny.
Rather than chase an arbitrary benchmark, compare your margin against three things: your own margin last year (is it trending up?), direct competitors in your sector, and the margin you need to fund growth. A margin that is stable or rising, and that leaves cash to reinvest, is doing its job. This ties directly into your broader cash flow analysis - margin tells you whether each sale is profitable, cash flow tells you whether you can pay the bills while you wait to collect.
Common Mistakes to Avoid
- Confusing margin with markup. Markup is profit divided by cost; margin is profit divided by revenue. A 50% markup is only a 33% margin, and a markup calculator keeps the two straight. Mixing them up will overstate your profitability.
- Using the wrong revenue figure. Always use net revenue (after refunds and discounts), not gross bookings.
- Ignoring which margin you're quoting. A 40% gross margin and an 11% net margin can describe the same business. Be clear about which one you mean, especially when talking to investors or lenders.
- Forgetting your own salary. If you're a founder paying yourself out of "profit" rather than as an operating expense, your net margin is flattering you.
Conclusion
Calculating profit margin comes down to one move: divide profit by revenue and multiply by 100. Choose gross margin to judge your pricing, operating margin to judge your operations, and net margin to see what you truly keep. Run all three regularly and you'll always know whether growth is actually making you money - or just making you busy.
Want to sharpen the numbers behind your margins? Start by getting your books in order with a clean profit and loss statement, and the calculations will take care of themselves.
Sources: Corporate Finance Institute - Profit Margin, Cornell Law School Legal Information Institute - Profit Margin, Britannica Money - Profit Margin Types.