Gross margin calculator for retailers
Gross margin is gross profit divided by the selling price, both ex VAT. Type a cost and a shelf price, inc or ex VAT, to get the margin, the profit per unit and the markup, or set a target margin to get the price.
- Gross margin
- 40%
- Gross profit per unit
- £4.00
- Markup
- 66.7%
UK standard VAT is 20%; most food is zero-rated, so set 0% for those lines.
Source: GOV.UK, VAT rates (standard 20%, reduced 5%, zero 0%), read 12 November 2026.
The gross margin formula
Gross profit = selling price ex VAT − cost ex VAT
Gross margin % = gross profit ÷ selling price ex VAT × 100
Both sides are ex VAT. The VAT in a shelf price is collected for HMRC, not earned, and a VAT-registered retailer reclaims the VAT it pays suppliers. A product that costs £6 ex VAT and sells for £12 on the shelf at 20% VAT makes £4.00 of gross profit on a £10.00 net price: a 40% margin. Worked on the £12 shelf price it looks like 50%, an easy mistake when the till report shows sales inc VAT.
Most food is zero-rated, so for much of a grocery basket the shelf price is already the net price. A mixed basket needs each line taken back at its own rate before the margins are added up.
Margin vs markup
Both start from the same gross profit. Margin divides it by the selling price; markup divides it by the cost. The £6 product above sells for £10 ex VAT: £4 of profit is a 40% margin and a 66.7% markup. Pricing at “cost plus 40%” therefore gives a 28.6% margin, not 40%.
Margin = markup ÷ (1 + markup)
Markup = margin ÷ (1 − margin)
Gross, operating and net margin
- Gross margin: sales less the cost of the goods sold, over sales. What the products earn before the shop is run.
- Operating margin: gross profit less the costs of running the business, such as staff, rent and energy, over sales.
- Net margin: what is left after every cost, including interest and tax, over sales.
Margin across stores is weighted by sales
A chain’s margin is its total gross profit over its total sales, not the average of its stores’ margins. The same goes for categories: a high-margin category with small sales barely moves the total.
The average of 30% and 50% is 40%; the chain earns 34%, because Store A sells four times as much. It also means chain margin can fall while every store holds its own: if sales shift towards the lower-margin store, the total drops.
Margin vs GMROI
Gross margin says how much each sale keeps. It does not say how much stock it took to earn it. GMROI divides the year’s gross margin by the average stock at cost, so a thin-margin line that sells fast can earn more on its stock than a high-margin one that sits on the shelf. Read our GMROI guide for the formula and figures by retail category.
Margin by store, every morning
marql compares sales, margin and stock for every store on one page by morning, with the POS and ERP your stores already run. Wherever a cost price exists, margin is computed per product and per category, for one store and across the chain. See how it works for retail chains.