portfolios.tools

Gross Margin Calculator

Free gross margin calculator by product. Enter price, unit cost, and volume for each SKU to get unit margin, margin percentage, total contribution, your blended gross margin, and which products carry the profit.

Products
Margin Summary

Blended Gross Margin

36.0%

Total Revenue

$50,000

Total Cost of Goods

$32,000

Total Gross Profit

$18,000

Gross Profit from Top Products

66.7%

Share carried by your top fifth of products

Margin by Product
ProductUnit MarginMargin %Gross ProfitShareMargin RankProfit Rank
Product 1$4040.0%$4,000
22.2%
22
Product 2Best margin$3060.0%$12,000
66.7%
11
Product 3$210.0%$2,000
11.1%
33

How the Gross Margin Calculator Works

Gross margin is what remains from a sale after the direct cost of delivering it. Per unit it is simply the selling price minus the unit cost, and as a percentage it is that difference divided by the price. The percentage matters more than the absolute figure when comparing products, because it tells you how much of every unit of revenue you actually keep before overheads.

Add a row for each product, SKU, or service line. Enter the selling price per unit, the cost of goods sold per unit, and the number of units sold in the period. Unit cost should include everything that scales with each sale: materials, direct labor, packaging, inbound freight, and payment processing. Rent, salaries, and software belong in overheads, not here, because they do not vary with the next unit sold.

The calculator produces two separate rankings, and the gap between them is usually the interesting part. The first ranks by unit margin percentage, showing which products are most profitable per sale. The second ranks by total contribution, which is unit margin multiplied by volume, showing which products actually generate the most gross profit. A product can top one list and sit near the bottom of the other.

It also reports your blended gross margin across the whole mix, computed as total contribution divided by total revenue rather than as an average of the individual percentages. That distinction matters: a high volume low margin line pulls the blended figure down far more than a simple average would suggest. Finally, a concentration figure shows what share of gross profit comes from your top fifth of products, which is the fastest way to see whether the business is leaning on a handful of SKUs.

Step by step

  1. Add a row per product with selling price, unit cost, and units sold.
  2. Review unit margin, margin percentage, and total contribution for each row.
  3. Check the blended margin, the two rankings, and the concentration figure.

Worked Example

A shop sells three products. Product A sells for 100 with a unit cost of 60, and moves 100 units. Product B sells for 50 with a unit cost of 20, and moves 400 units. Product C sells for 20 with a unit cost of 18, and moves 1,000 units. Unit margins are 40, 30, and 2, giving margin percentages of 40, 60, and 10 percent. Total contributions are 4,000, 12,000, and 2,000, on revenues of 10,000, 20,000, and 20,000.

Total revenue is 50,000 and total contribution is 18,000, so the blended gross margin is 36 percent. Notice that a simple average of the three percentages would give 36.7 percent, which overstates the result: the blended figure is weighted by revenue, and Product C contributes a fifth of the sales at only ten percent margin. Product B leads both rankings here, but the two often diverge. Product C is the one to examine: it ties Product A for revenue while producing a sixth of the gross profit, so a small price rise or cost reduction on that line moves the blended margin more than the same change anywhere else.

When to Use This Calculator

Use it when deciding where to focus, whether that is which products to promote, which to reprice, and which to discontinue. It is also the right starting point before a pricing review, because seeing unit margin next to volume tells you which lines can absorb a price change and which cannot. Run it again after any supplier cost increase to see which products are quietly slipping toward break even.

The concentration figure is worth checking on its own before you make plans that depend on a single product. If the top fifth of your SKUs produces most of the gross profit, the business is more exposed to a supplier problem or a competitor undercutting one line than the revenue figures alone suggest. Pair this with the break even calculator to convert a target margin into the sales volume that actually covers your fixed costs.

Common Mistakes

The most common mistake is averaging the individual margin percentages instead of blending them by revenue. A simple average treats a product selling ten units the same as one selling ten thousand, which usually flatters the result. Always divide total contribution by total revenue. A related error is confusing gross margin with markup: a product costing 60 and selling for 100 has a 40 percent margin but a 67 percent markup, and quoting one when you mean the other leads to systematic underpricing.

A second mistake is putting fixed costs into unit cost. Rent, salaries, and software do not change with the next unit sold, so including them in cost of goods sold understates every margin and makes healthy products look marginal. A third is judging products by unit margin percentage alone. A high margin product selling almost nothing contributes little, while a modest margin on high volume can be the line that actually pays the bills. That is precisely why this tool shows both rankings.

Gross Margin Formula

Per SKU:

Unit Margin = Price - Unit Cost

Unit Margin % = (Price - Unit Cost) / Price x 100

Total Revenue = Price x Units Sold

Total Contribution = Unit Margin x Units Sold

Blended Gross Margin % = sum(Total Contribution) / sum(Total Revenue) x 100

Contribution Share % = Total Contribution / sum(positive Total Contribution) x 100

Concentration:

Rank SKUs by Total Contribution, descending

Top SKUs = ceiling(count x 0.2), minimum 1

Concentration % = sum(Total Contribution of Top SKUs) / sum(positive Total Contribution) x 100

The blended margin is weighted by revenue rather than averaged across the SKU percentages, which is why it can sit below every individual line when a high volume product carries a thin margin. Concentration is measured against positive gross profit only, so a loss making SKU does not inflate the share attributed to the profitable ones. A price of zero produces no meaningful margin percentage and is reported as unavailable rather than as zero or infinity.

Limitations and Assumptions

This calculator measures gross margin only, meaning revenue less the direct cost of goods. It says nothing about net profitability, because rent, salaries, marketing, software, and every other overhead sit below this line. A product with a healthy gross margin can still lose money once its share of overheads is counted. The model also assumes one price and one unit cost per product across the whole period, so it does not capture discounting, promotional pricing, tiered supplier costs, returns, shrinkage, or currency movement on imported goods. It uses units sold rather than units produced, so it ignores inventory timing and unsold stock. Results are educational estimates and should not replace advice from a qualified accountant.

Key Terms

Gross Margin
Selling price minus the direct cost of goods, expressed in currency or as a percentage of price. It measures what you keep from each sale before overheads.
Contribution
Unit margin multiplied by units sold. The total gross profit a product generates, which depends on volume as well as margin.
Blended Margin
Total gross profit divided by total revenue across all products. Weighted by revenue rather than averaged, so the products you sell most of matter most.

Compare Alternatives

Gross margin tells you what each sale keeps, not how many sales you need. The break even calculator turns a contribution margin into the unit volume that covers your fixed costs, which is the natural next question once you know your margins. For a product line with a stable sales mix, the multi product breakeven calculator applies a weighted contribution margin across the whole range at once.

If you are examining pricing rather than product mix, the CVP target profit calculator works backwards from a profit goal to the price and volume combination that reaches it. For subscription businesses where the same customer buys repeatedly, gross margin per unit matters less than retention, and the LTV and CAC ratio calculator is the better fit.

FAQ

What is a good gross margin?

It depends entirely on the industry. Grocery retail commonly runs in the low tens of percent, manufacturing in the twenties to forties, and software above eighty because the cost of serving one more customer is close to nothing. The useful comparison is against your own history and your direct competitors, not a cross industry benchmark. What matters more than the level is the direction: a margin drifting down over several periods is a signal regardless of where it started.

What is the difference between gross margin and markup?

Gross margin is calculated on the selling price, markup on the cost. A product costing 60 and selling for 100 has a margin of 40 percent, because the 40 of profit is measured against the 100 price, but a markup of about 67 percent, because that same 40 is measured against the 60 cost. Confusing the two is a common source of underpricing, since applying a 40 percent markup when you intended a 40 percent margin leaves you short.

What belongs in cost of goods sold?

Anything that scales with each unit sold: materials, components, direct labor for production, packaging, inbound freight, and payment processing fees. Costs that stay the same regardless of volume, such as rent, salaried staff, insurance, and software subscriptions, are overheads and belong below the gross margin line. Including them in unit cost understates every margin and can make a viable product look unprofitable.

Why is my blended margin lower than most of my products?

Because the blend is weighted by revenue, not by product count. If one high volume line runs a thin margin, it dominates the calculation even when several other products carry healthy margins. That is the intended behaviour and it is the honest number, since it reflects the mix you actually sell. If the blended figure surprises you, look at the contribution ranking to find which line is pulling it down.

What does the concentration figure tell me?

It shows what share of your gross profit comes from the top fifth of your products, ranked by contribution. A high figure means the business depends on a small number of SKUs, so a supplier problem, a stockout, or a competitor undercutting one of them has an outsized effect. It is a concentration risk measure rather than a performance measure: a high number is not automatically bad, but it is worth knowing before you build plans around it.

Can I use this calculator on my phone or tablet?

Yes. The Gross Margin Calculator runs entirely in your mobile browser with the same formulas as desktop. The SKU table scrolls sideways on narrow screens. Optional localStorage may remember your product rows on your device when enabled in browser settings. No app download required.

Where is my data stored when I use this calculator?

Nowhere on our servers. Calculations execute locally in your browser. Optional localStorage saves your product names, prices, costs, and volumes on your device only and never transmits business data over the network.

Should I include discounts and returns?

For the most accurate picture, use your average realised price after discounts rather than list price, since heavily discounted lines often have far thinner margins than the price list suggests. Returns are harder to model here: if a product has a high return rate, its effective margin is lower than shown, because you carry the cost of goods and often the shipping on units that generate no revenue.

Related Tools

The Break Even Calculator converts your contribution margin into the volume needed to cover fixed costs. The Multi Product Breakeven Calculator applies a weighted margin across a full product range. The CVP Target Profit Calculator works backwards from a profit goal to price and volume.