How to calculate margin, markup and selling price
A product bought for 60 and sold for 100 has a 40 percent margin and a 66.7 percent markup. Same product, same money, two numbers — and only one of them is what your accountant means.
Updated 2026-10-16
How to calculate margin
Margin is the share of the price you keep after the cost of the goods. The profit margin formula:
margin = (price − cost) ÷ price × 100%
A product bought for 60 and sold for 100: the profit is 40, and 40 ÷ 100 = a 40% margin. Use net figures for both — sales tax and VAT are not your revenue.
Calculated this way it is the gross margin: profit on the goods alone, before everything else you pay for — shipping, ads, rent.
Your margin also sets the point where ads pay off: break-even ROAS is 1 divided by the margin. The calculator shows it below the results, and the formula and a table are on the break-even ROAS page.
How to calculate markup
Markup is the percentage you add on top of the cost:
markup = (price − cost) ÷ cost × 100%
The same product: 40 ÷ 60 = a 66.7% markup. Both numbers describe the same gross profit; they differ only in what they divide it by. Margin can never reach 100%, because you cannot keep more than the whole price. Markup has no ceiling at all — a product bought for 5 and sold for 50 has a 900% markup and a 90% margin.
How to calculate selling price from cost and margin
You know the cost and want a particular margin. Then you divide the cost instead of adding a percentage to it:
price = cost ÷ (1 − margin)
Cost 100, margin 30%: 100 ÷ 0.7 = 142.86. Adding 30% to the cost would give 130 — and that is a 23.1% margin, not 30%. The lower half of the calculator works out the price from a margin for you.
Two things break the sum after you have priced:
- Rounding down. 142.86 rounded to 139 is a 28.1% margin. Round up: 145 gives 31%.
- A discount. 10% off 142.86 is 128.57, a 22.2% margin. Profit per item falls from 42.86 to 28.57 — by a third, although the discount was only 10%. To make the same profit you need to sell half as many items again; the discount margin calculator works it out.
Margin vs markup: why shops mix them up
The confusion is not carelessness. It is that the two sides of the same conversation use different definitions:
- suppliers and wholesalers quote markup — “we sell at cost plus fifty”;
- accountants, tax returns and every benchmark you will ever be compared against use margin.
So a shop that prices “at cost plus 40%” and then reads a report saying “margin 28.6%” concludes the report is broken. It is not: cost plus 40% is a 28.6% margin. The gap between the number you priced with and the number you are judged on is exactly where budgets go missing.
Converting markup to margin and back
With both as fractions:
markup from margin: u = m ÷ (1 − m) 0.40 → 0.667
margin from markup: m = u ÷ (1 + u) 0.50 → 0.333
The pairs worth knowing by heart:
| Markup | Margin | Price multiplier |
|---|---|---|
| 20% | 16.7% | 1.20× |
| 30% | 23.1% | 1.30× |
| 50% | 33.3% | 1.50× |
| 75% | 42.9% | 1.75× |
| 100% | 50.0% | 2.00× |
| 150% | 60.0% | 2.50× |
| 200% | 66.7% | 3.00× |
| 300% | 75.0% | 4.00× |
The right-hand column is the one to price with. “Double the cost” is unambiguous, and it happens to be exactly a 50% margin.
Two WooCommerce details that trip this up
The cost field is net. WooCommerce’s Cost of goods field, like its price fields, carries no tax. If your supplier invoices you with VAT and you enter the gross figure, every margin in your shop will be understated by the tax rate — and it will look plausible, which is worse.
Your prices may be entered inclusive of tax. In that case the price you type into the product editor is not the price this calculation uses. A profit report works on net line totals, so compare like with like: net cost against net price.
What Merchgain reports
Margin, always — profit divided by revenue, printed with its definition under the report so that nobody has to guess which convention was used. The details, including what counts as revenue, are in how profit and margin are calculated, and the short version is in how margin is calculated.
Nothing you type into the calculator above leaves your browser. There is no request and nothing to submit — the arithmetic is a few divisions and it happens on your own machine. The page view itself is counted, without a cookie, like every page here: see privacy.