Free foreverNo signupNo usage limitsBuilt for founders, agencies & small teamsSmart tools that skip the busywork

How-to guide

How to Calculate Profit Margin (Formula + Examples)

Updated July 6, 20269 min read

Profit margin is the percentage of your revenue you actually keep after costs. It's the single most useful number a small business can track, because it answers the question every owner is really asking: *for every dollar that comes in, how much stays with me?* Revenue tells you how busy you are. Margin tells you whether being busy is worth it.

The math is genuinely simple — divide profit by revenue and multiply by 100. The part that trips people up is knowing *which* profit and *which* costs to use, because "profit margin" actually names three different numbers. This guide walks through the formula, the three margin types, and worked examples with real small-business numbers, so you can calculate yours by hand in under a minute.

Editorial hero illustration for the guide How to Calculate Profit Margin, showing the core idea that margin is the share of each dollar you keep after costs, with three chips: gross, operating, and net margin.

The profit margin formula

Every profit margin uses the same formula. Only the definition of "profit" changes.

Profit margin (%) = (Profit ÷ Revenue) × 100

Revenue is your total sales before any costs come out. Profit is what's left after you subtract a specific set of costs. Multiply by 100 to turn the decimal into a percentage.

That's it. If a freelance designer bills $6,000 in a month and $1,500 of costs come out, the profit is $4,500 and the margin is 4,500 ÷ 6,000 × 100 = 75%. The only real decision is which costs you subtract — and that's what separates gross, operating, and net margin.

A diagram of the profit margin formula: profit divided by revenue, times one hundred, equals margin percent, illustrated with a $40 sale that costs $16, leaving $24 of profit and a 60 percent margin.
One formula, three margins — the only thing that changes is which costs you subtract to get 'profit'.

The three types of profit margin

The three margins are layers. Each one subtracts more costs than the last, so each is smaller than the one above it. Reading all three tells you *where* your money goes.

MarginProfit usedCosts subtractedQuestion it answers
Gross marginGross profitDirect costs of the product/service (COGS)Is each sale profitable on its own?
Operating marginOperating profitCOGS + operating expenses (rent, software, wages)Is the business itself profitable to run?
Net marginNet profitEverything, including tax and interestWhat do you actually take home?

Gross margin

Gross margin subtracts only the direct cost of what you sold — the materials, wholesale cost, or direct labor that goes into each unit. This is your cost of goods sold, or COGS.

Gross margin = (Revenue − COGS) ÷ Revenue × 100

A candle maker sells a candle for $28. The wax, wick, jar, and label cost $9.80. Gross profit is $18.20, so gross margin is 18.20 ÷ 28 × 100 = 65%. Gross margin tells you whether the product itself makes money before the overhead of running the business.

Operating margin

Operating margin subtracts COGS and your operating expenses — rent, utilities, software subscriptions, marketing, and staff wages. These are the costs of keeping the doors open, whether or not you make a sale.

Operating margin = (Revenue − COGS − Operating expenses) ÷ Revenue × 100

This is the number that tells you if the business model works, because it counts the overhead that a busy owner often forgets.

Net margin

Net margin subtracts *everything* — COGS, operating expenses, interest on any loans, and taxes. It's the bottom line, the money that's genuinely yours.

Net margin = Net profit ÷ Revenue × 100

For most small business decisions, gross and net margin are the two you'll reach for most: gross to price individual products, net to see what the whole operation leaves you.

A layered waterfall showing revenue of $28 stepping down through cost of goods, operating expenses, and tax to reveal gross margin of 65 percent, operating margin of 39 percent, and net margin of 29 percent for one candle.
Each margin subtracts more costs than the last, so each is smaller — reading all three shows where the money goes.

How to calculate profit margin, step by step

Here's the process for any margin type:

  1. Pick which margin you want. Gross for a single product, net for the whole business. Be clear before you start, or you'll compare numbers that don't mean the same thing.
  2. Add up your revenue. Total sales for the product, order, or period you're measuring — before any costs.
  3. Add up the matching costs. For gross margin, only direct costs (COGS). For net margin, every cost including tax. The costs must match the margin you chose in step 1.
  4. Subtract costs from revenue to get profit. Revenue minus costs equals the profit figure.
  5. Divide profit by revenue, then multiply by 100. That's your margin as a percentage.

The Profit Margin Calculator does steps 4 and 5 instantly — enter revenue and cost and it returns the margin, the markup, and the profit in one view. But do it by hand once or twice; understanding the mechanic is what lets you spot when a number looks wrong.

Worked example: a small bakery

A bakery wants to know the margin on its signature sourdough loaf, and on the business overall for the month.

Per-loaf gross margin. The loaf sells for $9. Flour, water, salt, and the energy to bake it come to $2.70 in direct costs.

  • Gross profit = $9 − $2.70 = $6.30
  • Gross margin = 6.30 ÷ 9 × 100 = 70%

Each loaf is strongly profitable on its own. Good — but that's before rent and wages.

Monthly net margin. Over the month the bakery does $24,000 in revenue. COGS across everything is $8,400. Rent, wages, utilities, and insurance add $11,000. Tax and loan interest come to $1,800.

  • Net profit = $24,000 − $8,400 − $11,000 − $1,800 = $2,800
  • Net margin = 2,800 ÷ 24,000 × 100 = 11.7%

Notice the gap: a 70% gross margin on the hero product, but under 12% net once the whole operation is counted. That gap is normal, and it's exactly why you track both. A great gross margin can still leave a thin net margin if overhead is heavy — and you can only fix what you can see.

What is a good profit margin?

There's no universal "good" number, and any source that gives you one without asking about your industry is guessing. Margins vary enormously: a software product might net 30%+, a grocery store runs on low single digits and makes it up on volume, and a service business with no inventory can hold gross margins above 60%.

A few honest reference points instead of fake benchmarks:

  • Compare yourself to yourself. Is this month's margin better than last quarter's? Trend beats any industry average.
  • Service businesses run higher gross margins than product businesses, because they have little or no COGS — your main cost is time.
  • Product and retail businesses run thinner because inventory, shipping, and fees eat into every sale, so they need volume.
  • Watch the direction. A margin that's shrinking while revenue grows means costs are rising faster than sales — a quiet problem that a revenue-only view completely hides.

If you're setting prices from scratch rather than checking existing ones, the margin you *want* should drive the price. Our guide on how to price a product for retail works backward from a target margin to a shelf price.

Common mistakes when calculating margin

  • Confusing margin with markup. They use the same two numbers but a different formula, and they are never equal. A 50% markup is only a 33% margin. This one mistake quietly underprices thousands of small businesses — see markup vs margin for the fix.
  • Forgetting your own time is a cost. If you don't pay yourself a real wage in the cost column, your margin is fiction. Price your labor in — the Hourly Rate Calculator shows the rate to use.
  • Mixing up which costs go with which margin. Subtracting rent when you meant to calculate *gross* margin gives you a number that's neither gross nor net. Keep the layers clean.
  • Measuring only revenue. "We did $30,000 this month" feels great and tells you nothing about whether you kept any of it. Margin is the number that matters.
  • Using list price instead of the price actually paid. Discounts, refunds, and platform fees lower real revenue. Calculate on what actually landed in your account.

Checklist

  • [ ] Decide which margin you need: gross, operating, or net
  • [ ] Total the revenue for the product or period
  • [ ] Total only the costs that match that margin
  • [ ] Subtract to get profit, divide by revenue, multiply by 100
  • [ ] Include your own labor as a cost
  • [ ] Compare to your own past margins, not a made-up benchmark

FAQs

What is the formula for profit margin?+

Profit margin equals profit divided by revenue, multiplied by 100 to get a percentage. For gross margin, "profit" is revenue minus the direct cost of goods sold; for net margin, it's revenue minus every cost including tax and interest. The [Profit Margin Calculator](/tools/profit-margin-calculator) applies the formula instantly.

What's the difference between gross and net profit margin?+

Gross margin subtracts only the direct cost of what you sold (materials, wholesale cost, direct labor). Net margin subtracts *everything* — direct costs plus rent, wages, marketing, interest, and tax. Gross margin shows if a product is profitable; net margin shows what the whole business takes home.

Is a higher profit margin always better?+

Usually, but not always in isolation. A high margin on tiny volume can earn less total money than a lower margin on high volume. Margin and volume together determine your actual profit, so read them side by side rather than chasing the percentage alone.

How do I calculate margin from cost and selling price?+

Subtract the cost from the selling price to get profit, divide that by the selling price, and multiply by 100. If something costs you $60 and sells for $100, the margin is `40 ÷ 100 × 100 = 40%`. Note it's divided by the *selling price*, not the cost — dividing by cost gives markup instead.

Why is my margin lower than my markup?+

Because they divide by different numbers. Markup divides profit by cost; margin divides profit by the (larger) selling price. Since the denominator is bigger, the margin percentage is always smaller than the markup percentage for the same sale.

What counts as cost of goods sold?+

COGS is the direct cost of producing what you sold — raw materials, the wholesale price of resold goods, and the direct labor that goes into each unit. It excludes overhead like rent, admin salaries, and marketing, which belong in operating expenses instead.

Final take

Profit margin is profit divided by revenue times 100 — one formula, three layers depending on which costs you subtract. Track gross margin to price your products and net margin to see what the business truly earns, and never let a big revenue number distract you from a thin margin underneath it. Run your own numbers through the Profit Margin Calculator, then, if you're comparing it to a markup, read markup vs margin so you never confuse the two again.