How to calculate gross margin by product
A blended margin is an average of things that have nothing in common, and it hides which products are carrying the business.
The short answer
Gross margin by product is revenue minus cost of goods sold for each line, expressed as a percentage of that line's revenue. A blended figure across the whole business averages together products with completely different economics and hides which ones actually generate the profit.
The formula
gross profit per unit = price - unit cost
margin % = gross profit per unit / price
line gross profit = gross profit per unit x units sold
share of profit = line gross profit / total gross profit
Share of revenue and share of profit are different numbers and comparing them is the point of the exercise. A line with a large revenue share and a small profit share is being carried by the others.
Worked example
Three products over a year:
A: 400 units x 22.00, cost 9.00 → 13.00 each = 5,200 (59.1% margin)
B: 120 units x 65.00, cost 41.00 → 24.00 each = 2,880 (36.9%)
C: 900 units x 8.00, cost 6.20 → 1.80 each = 1,620 (22.5%)
revenue = 8,800 + 7,800 + 7,200 = 23,800
gross profit = 9,700 → blended margin 40.8%
C: 30.3% of revenue, 16.7% of profit
A: 37.0% of revenue, 53.6% of profit
The blended 40.8% describes nothing you sell. Product C moves the most units, takes the most shelf space and handling, and produces a sixth of the profit.
What belongs in unit cost and what does not
In: materials, direct labor, packaging, inbound freight, and payment processing where it scales with the sale. Anything that would not exist if you did not sell that unit.
Out: rent, salaries, software, marketing. Those are operating expenses and pushing them into unit cost turns gross margin into something else, which makes it incomparable to anyone else's figure and to your own last year.
The awkward middle is outbound shipping. If the customer pays it separately, keep both out. If you absorb it, it belongs in cost, and forgetting it is how a healthy looking margin turns out to be nothing.
The lines the analysis usually exposes
A high-volume low-margin product that everyone believes is the core of the business because it moves. It often is the core of the traffic and not of the profit.
A slow, high-margin line that gets neglected because it does not feel busy. Doubling its volume can be worth more than a ten percent rise across everything else.
And the loss-maker nobody has recalculated since a supplier price rise. This is the most common single finding and it is usually two years old.
Why margin percentage alone still misleads
Percentage ignores volume and cash. A 60% margin on four units a month is less useful than a 25% margin on four hundred, and a business can optimise itself into a very high margin and no money.
Look at margin percentage and total gross profit per line together, then at the handling each line demands. The right ranking is rarely the same as the ranking by either number alone.
What this leaves out
- Assumes unit costs are current. A cost list that predates the last supplier increase produces margins that are confidently wrong.
- Excludes returns and shrinkage, which reduce realised margin and hit some lines much harder than others.
- Assumes no meaningful discounting. Where discounts are common, calculate on realised price rather than list price.
This arithmetic is free to run in your browser — no signup, nothing held back.
Open the free calculatorCommon questions
- What is a good gross margin?
- It depends on the sector and comparing across sectors is meaningless. The comparison that pays is your own lines against each other, and this year against last, where the only thing that changed is you.
- Should I drop my lowest margin product?
- Not automatically. It may bring people in, complete a range, or absorb capacity that would otherwise sit idle. Look at whether it carries its own handling cost first, and drop it only if it does not.
- How often should I recalculate this?
- Whenever a supplier price changes, and at least twice a year regardless. Margins decay quietly through small cost increases that nobody passes on, and the decay is invisible in a blended figure.
Spreadsheets that do this
The formulas above, already built and checked — so you fill in your numbers rather than the arithmetic.
Related guides
Last reviewed 22 August 2026