Gross margin calculator
Gross margin is the share of a selling price left after paying for what you sold. Enter a price, or a period's revenue, with its cost of sales to see the gross profit and the margin, or enter a cost and the margin you want to find the price you need to charge.
Gross margin from price and cost
Price for a target gross margin
A margin of 100% or more would need a cost of nothing, so the price stays blank.
Use it for pricing a product or quoting a job. To take overheads, interest and tax off as well, use the profit margin calculator. If your team prices by adding a percentage to cost, the markup calculator covers that method.
How to calculate gross margin
Take the cost of sales away from the selling price, divide what's left by the selling price, and multiply by 100:
Gross margin % = (selling price − cost of sales) ÷ selling price × 100
Turned round, the same relationship gives the price for a margin you've chosen:
Price = cost ÷ (1 − target margin), with the margin as a decimal, so 40% is 0.4.
It works for a single item, a job or a whole year. For a year, use revenue and the cost of sales line from your P&L. Cost of sales means the direct costs of what you sold: materials, the wages of the people who make or deliver it, subcontractors and carriage. Office salaries, rent and marketing stay out, because they're overheads.
Worked example
A fictional 30-person sign maker is quoting for a shop-front sign. Materials, two days of fitting and access equipment come to £1,560. Its usual price for a sign that size is £2,400, which leaves £840 of gross profit: a 35% gross margin.
The directors want 40% on installation work. Dividing £1,560 by 0.6 gives £2,600, the answer the second calculator shows, and at that price the job makes £1,040.
Then the customer asks for 10% off the original £2,400. That's £2,160, and the cost hasn't moved, so gross profit falls from £840 to £600 and the margin to 27.8%. Taking a tenth off the price has removed more than a quarter of the profit. Put £2,160 and £1,560 into the first calculator to see it.
Setting a price from a target margin
The most common slip is adding the margin to the cost. On a £60 cost, adding 40% gives £84, but £24 of profit on an £84 price is a 28.6% margin. Margin is measured against the price, so you have to divide instead: £60 ÷ 0.6 = £100, and £40 on £100 is the 40% you wanted.
The gap widens as targets rise. A 50% margin means charging twice the cost, and 75% means four times. A 100% margin is only possible if the item costs nothing, so the calculator leaves the price blank at 100% or above.
Reading margin across a product range
You can't simply average margins. Say one product line sells £100,000 at a 50% margin and another sells £300,000 at 20%. The average of the two percentages is 35%, but the company made £50,000 + £60,000 = £110,000 of gross profit on £400,000 of sales, which is 27.5%. Add up the gross profit and the revenue first, then divide.
It's also why a company's overall margin can fall while every product keeps its own: if the low-margin line grows fastest, the mix pulls the total down. Compare your margin with the same range last year and with what you quoted, and check the mix before blaming prices or suppliers. The margin you actually need comes from your overheads, which a break-even calculation makes clear.
Common mistakes
- Adding the margin to the cost instead of dividing by one minus the margin.
- Prices that include VAT. A VAT-registered business pays that VAT over to HMRC, so it isn't part of the sale, and leaving it in inflates the margin.
- Leaving direct labour out of cost of sales. If people are paid to make or fit the product, their time is part of its cost.
- Never checking actual costs. A job that overruns by a day loses margin the quote never showed.
- Averaging percentages across products, customers or months.
Frequently asked questions
What's the difference between gross profit and gross margin?
Gross profit is an amount of money: revenue minus cost of sales. Gross margin is that amount as a percentage of revenue, so £840 of gross profit on a £2,400 sale is a 35% margin.
Does gross margin include wages?
Only the wages of people whose work goes straight into what you sell, such as production staff, fitters or drivers. Managers, sales and office staff are overheads, which come off later, before operating profit.
Can gross margin be more than 100%?
No. The most you can keep is the whole price, which would mean the item cost nothing. Markup has no such ceiling, which is a quick way to tell which of the two a figure is.