How margin is calculated
Margin tells you how much of every sale you keep after paying for what you sold. Take the profit on a sale, divide it by the selling price, and multiply by 100.
margin = (price − cost) ÷ price × 100
Say you buy a lamp for $60 and sell it for $100. Profit is $40, and $40 out of $100 is a 40% margin. For every $1 a customer pays, 40 cents is yours.
Pricing for a margin you want
The more useful question is usually the reverse one: you know your cost and the margin you need, so what should you charge? Divide cost by one minus the margin.
price = cost ÷ (1 − margin)
For a 40% margin on a $60 item that's $60 ÷ 0.6 = $100. A common mistake is to add 40% to the cost instead, which gives $84 and only a 28.6% margin.
Margin vs markup
Both compare profit to something, they just pick a different base. Margin divides profit by the price. Markup divides profit by the cost. Because cost is always smaller than price on a profitable sale, markup is always the bigger number.
| Margin | Markup | Price for a $100 cost |
|---|---|---|
| 10% | 11.1% | $111.11 |
| 20% | 25% | $125.00 |
| 25% | 33.3% | $133.33 |
| 30% | 42.9% | $142.86 |
| 40% | 66.7% | $166.67 |
| 50% | 100% | $200.00 |
| 60% | 150% | $250.00 |
To convert yourself: markup = margin ÷ (1 − margin), and margin = markup ÷ (1 + markup), with both written as decimals.
Gross margin and net margin
This calculator works with whatever you count as cost. If you enter only what the product cost you to buy or make, the result is gross margin. If you fold in rent, wages, software, shipping and tax, you get net margin, which is the figure that tells you whether the business as a whole is making money.
A shop can run a healthy 50% gross margin and still lose money if overheads eat more than half of its sales.
What counts as a good margin
It depends heavily on the trade. Grocery stores often live on gross margins in the 20–30% range and make it up on volume. Clothing and cosmetics retailers frequently aim for 50% or more. Software and digital products can run far higher because each extra copy costs almost nothing to deliver.
Compare yourself with businesses that sell similar things in similar quantities, not with a single universal benchmark.