Margin Calculator
Enter any two numbers. Get your profit, margin and markup straight away — or work backwards from the margin you want to the price you should charge.
Your result
ProfitableShow the maths
Add tax, a discount, and selling costs
The figures above are your gross margin — selling price minus the cost of the product itself. Add what it actually costs you to make each sale and you get your contribution margin, which is the number that tells you whether a sale is worth making.
Price adjustments
Confirm the current rate that applies to your business before relying on this figure.
Cost of making the sale
Operating margin and net margin sit below this line. They need your overheads — rent, wages, software, insurance — which this calculator doesn't ask for, so it doesn't pretend to know them. How the four margins differ.
Everything is worked out in your browser. Your numbers are never sent to our server.
Margin vs markup
Margin and markup describe the same profit. They just divide it by different things — and that one difference is why a 50% markup is only a 33.3% margin.
Margin measures profit against the price you charge. Markup measures the same profit against what the item cost you. Because the price is always the bigger number, the margin is always the smaller percentage.
Converting between them
| If you want this margin | You need this markup | On a cost, charge |
|---|---|---|
| 10% | 11.11% | |
| 20% | 25.00% | |
| 25% | 33.33% | |
| 30% | 42.86% | |
| 40% | 66.67% | |
| 50% | 100.00% | |
| 60% | 150.00% | |
| 70% | 233.33% | |
| 75% | 300.00% |
The profit margin formula
Profit margin is the share of your selling price that you keep once the cost of the item is paid for. Two steps:
Sell for an item that cost you and you keep , which is 40% of what the customer paid. That is a 40% margin.
Markup answers a different question — how much you added on top of cost:
The same against a cost is a 66.67% markup.
Worked examples
| Cost | Price | Profit | Margin | Markup |
|---|---|---|---|---|
| 40.00% | 66.67% | |||
| 33.33% | 50.00% | |||
| 20.00% | 25.00% | |||
| 75.00% | 300.00% | |||
| 50.00% | 100.00% | |||
| −20.00% | −16.67% |
The last row is a loss. Margin can be negative, and the calculator will say so rather than hiding it.
Working out a selling price from a target margin
This is where most pricing goes wrong. If an item costs you and you want a 40% margin, adding 40% gives — and that is a 28.57% margin, not 40%.
Why adding your target percentage doesn't work
Adding 40% to your cost is a 40% markup, and markup is measured against cost. Margin is measured against the selling price, which you don't know yet. So you can't add it on — you have to divide it out.
÷ (1 − 0.40) = ÷ 0.60 = . That gives profit on a sale, which is a genuine 40% margin.
| Target margin | Correct price | Price if you just add the % | Margin you'd actually get | Lost per sale |
|---|---|---|---|---|
| 20% | 16.67% | |||
| 30% | 23.08% | |||
| 40% | 28.57% | |||
| 50% | 33.33% | |||
| 60% | 37.50% |
Select Cost + target margin in the calculator to work this out for your own figures.
What a discount really costs you
A discount comes off the price, but your cost doesn't move. So the entire discount comes out of your profit — which is why a modest-looking discount can take a large bite out of your margin.
Take a item that costs you . That's a 40% margin. Offer 20% off and you now sell it for . Your cost is still , so your profit drops from to , and your margin falls from 40% to 25%.
Put another way: a 20% discount cost you half your profit.
Turn on Add tax, a discount, and selling costs in the calculator to model your own.
| Discount | You charge | Profit | Margin |
|---|---|---|---|
| 0% | 40.00% | ||
| 10% | 33.33% | ||
| 20% | 25.00% | ||
| 30% | 14.29% | ||
| 40% | 0.00% | ||
| 50% | −20.00% |
Gross, contribution, operating and net margin
"Profit margin" isn't one number. It depends on which costs you've taken off, and people comparing margins are often comparing different things entirely. These are the four levels, in the order costs come out.
| Margin | What's deducted | Question it answers |
|---|---|---|
| Gross | The cost of the product itself | Is this product worth selling at all? |
| Contribution | Product cost plus every variable cost of the sale — shipping, packaging, payment and marketplace fees, advertising | Does each individual sale leave money behind? |
| Operating | The above plus overheads — rent, wages, software, insurance | Does the business itself work? |
| Net | Everything, including interest and tax | What do you actually keep? |
This calculator gives you the first two. It stops there deliberately: operating and net margin need your overheads, and a calculator that invented them would be giving you a confident number built on a guess.
Which costs go where
| Cost | Gross | Contribution |
|---|---|---|
| What you paid for the product or its materials | Yes | Yes |
| Shipping you pay to get it to the customer | No | Yes |
| Packaging | No | Yes |
| Card and payment processing fees | No | Yes |
| Marketplace or platform commission | No | Yes |
| Advertising spend per sale | No | Yes |
| Rent, salaries, software, insurance | No | No — these are overheads |
| VAT you collect | Neither — it isn't your money | Neither |
VAT and your margin
If you're VAT registered, the VAT on your sales isn't revenue — you're collecting it for HMRC and passing it on. Work your margins out on the ex-VAT price.
Frequently asked questions
What is a profit margin?
The share of your selling price left over after costs, written as a percentage. A 40% margin means that for every you take, is profit and went on costs.
How do I calculate a 20%, 30% or 40% margin?
Divide your cost by 1 minus the margin as a decimal. For 20%, divide by 0.8. For 30%, divide by 0.7. For 40%, divide by 0.6. A item at a 40% margin is ÷ 0.6 = .
What's the difference between margin and markup?
Both describe the same profit against a different baseline. Margin divides profit by the selling price, markup divides it by the cost. Because the price is the larger number, margin is always the smaller percentage — a 50% markup is a 33.3% margin.
Can a profit margin be more than 100%?
No. Margin is a share of your selling price, so 100% would mean the item cost you nothing and anything above that is impossible. Markup has no ceiling — a item sold for is a 300% markup and a 75% margin.
Can a margin be negative?
Yes, and it's worth seeing. A negative margin means you're selling below cost. Sometimes that's deliberate — a loss leader, or clearing old stock — but it should be a decision rather than a surprise.
Should shipping be included in my margin?
Not in gross margin, which covers the product cost only. But shipping you pay for absolutely belongs in contribution margin, and for most online sellers contribution margin is the more useful number. Open the advanced section to include it.
Should payment and marketplace fees be included?
Yes, in contribution margin. A 2.9% payment fee plus a 15% marketplace commission takes nearly 18% off every sale. On a 25% gross margin that leaves very little, which is exactly the sort of thing worth finding out before you set a price rather than after.
Should VAT be included in margin?
No. VAT you charge is collected on HMRC's behalf and passed on, so it was never your revenue. Use ex-VAT prices throughout, or switch on the VAT option in the calculator and enter your VAT-inclusive price.
Is margin the same as gross margin?
Usually, in casual use. "Margin" on its own normally means gross margin — price minus the cost of the product, over the price. It's worth checking though, because someone quoting a margin at you may be including costs you aren't.
How do I calculate margin in Excel or Google Sheets?
With cost in A2 and selling price in B2: profit is =B2-A2, margin is =(B2-A2)/B2, and markup is =(B2-A2)/A2. Format the last two as percentages. To find a price for a target margin in C2, use =A2/(1-C2).
What is a good profit margin?
There's no single answer, and anyone giving you one without asking what you sell is guessing. Margins vary enormously by industry, business model and country — a supermarket and a software company are both healthy at wildly different numbers. A more useful question is whether your margin covers your overheads at your current sales volume. A break-even calculation answers that; a benchmark doesn't.