Gross margin
Gross margin is the share of revenue left after subtracting the cost of goods sold, shown as a percentage.
By Berend Vrakking, founder of Product Metrics. Updated 10 November 2026.
Gross margin formula
Gross margin % = (revenue − cost of goods sold) ÷ revenue × 100
Revenue minus cost of goods sold is gross profit, in euros. Gross margin is that gross profit as a percentage of revenue. What counts as cost of goods sold depends on your accounting rules.
Gross margin example
| Step | Value |
|---|---|
| Revenue (excl. VAT) | €50,000.00 |
| Cost of goods sold | €30,000.00 |
| Gross profit (€50,000.00 − €30,000.00) | €20,000.00 |
| Gross margin (€20,000.00 ÷ €50,000.00) | 40% |
Of every €1.00 of revenue, €0.40 is left after the cost of goods sold. Illustrative data.
Put it into practice
- Calculate it: Markup and margin calculatorWork out margin, markup and selling price from cost.
- Read the guide: What is a good ROAS?Why 1 ÷ gross margin is only the lowest possible break-even ROAS.
Gross margin: one product and the whole account
Per product, gross margin is price minus product cost, divided by price. The shop figure blends every product’s gross margin, weighted by how much each sells, so one bestseller can carry the whole number.
Gross margin stops at product cost. Shipping, payment fees and returns come off later, in contribution margin. A product that sells for €100.00 with €45.00 of product cost has a gross margin of 55% and a break-even ROAS of 1 ÷ 0.55 = 1.82. If shipping, fees and packaging take another €10.00, the contribution margin is 45% and the break-even ROAS is 2.22. Illustrative data.
Gross margin: common mistake
Setting a ROAS target from gross margin. It ignores shipping, payment fees and returns, so the target comes out too low and products that lose money pass as profitable.
Gross margin: questions
What does a 40% gross margin mean?
What is the difference between gross profit and gross margin?
What is the difference between gross margin and net margin?
Sources
Keep reading
- Shopify Fee CalculatorSee what a US Shopify order leaves after card processing, product costs, delivery and ads. Start with Basic online card rates, then edit the fees to match your store.
- Price elasticityA higher unit margin does not establish how many units shoppers will buy at the new price.
- Gross margin vs net marginSee which costs each margin leaves out.
- COGS calculatorWork out COGS, gross profit and gross margin from stock and purchases.
- Cost of goods soldThe cost that gross margin subtracts from revenue.
- Contribution marginThe margin after shipping, fees and returns too, used for break-even ROAS.
- Markup vs marginDo not mix margin up with markup.
- Break-even ROAS calculatorFind the return each product needs to break even.
Also available in