Gross Margin Calculation: Formula, Example and Benchmarks
The gross margin calculation divides gross profit by revenue. Formula, worked example, margin versus markup and sector benchmarks for controllers.
The gross margin calculation subtracts the cost of goods sold from revenue and divides the difference by that same revenue: gross margin % = (revenue − cost of goods sold) ÷ revenue × 100. The outcome shows how much of every euro of revenue is left to cover fixed costs and profit.
For a controller the percentage is rarely the end of the analysis. Gross margin is the first line in the profit and loss statement where a pricing agreement, a supply contract or a shift in the product mix becomes visible. Losing two percentage points on five million in revenue costs a hundred thousand euro of operating result, and no overhead saving recovers that within a quarter. The margin therefore belongs on the table every month, split by product group or entity, rather than once a year at audit time.
What gross margin measures
Gross margin is the difference between revenue and the costs directly attributable to that revenue, expressed as a percentage of revenue. In absolute euros the same difference is called gross profit. The terms gross margin, gross profit margin and gross profit percentage are used interchangeably and point to the same ratio.
What sits inside cost of goods sold differs by company. A distributor typically counts only the purchase value of the goods sold plus inbound freight. A manufacturer adds direct materials, direct labour and sometimes machine hours. A services firm uses the direct hourly cost of billable staff. That boundary is a choice, not a rule — but it has to stay identical across years and across entities, or you are comparing two different things.
Do not confuse gross margin with the profitability measures further down the statement. EBITDA also deducts operating costs, and the net profit margin behind return on equity and assets additionally accounts for interest, depreciation and tax.
The gross margin calculation formula
Gross profit = revenue − cost of goods sold
Gross margin % = gross profit ÷ revenue × 100
- Take net revenue for the period: gross revenue less credit notes, discounts and returns. Sales discounts belong above the margin line, never below it.
- Determine the cost of goods sold. This is not what you purchased during the period but what you sold: opening inventory plus purchases − closing inventory.
- Subtract the cost of goods sold from net revenue. What remains is gross profit in euros.
- Divide gross profit by net revenue and multiply by 100.
- Repeat per product group, customer segment or entity. A single group percentage hides exactly the shift you are looking for.
Gross margin calculation example
A technical distributor with its own installation arm and a portfolio of service contracts closes the year with the following figures.
| Product group | Revenue | Cost of goods sold | Gross profit | Gross margin |
|---|---|---|---|---|
| Traded goods | € 2,400,000 | € 1,680,000 | € 720,000 | 30.0% |
| Installation projects | € 1,500,000 | € 900,000 | € 600,000 | 40.0% |
| Service contracts | € 600,000 | € 150,000 | € 450,000 | 75.0% |
| Total | € 4,500,000 | € 2,730,000 | € 1,770,000 | 39.3% |
1,770,000 ÷ 4,500,000 × 100 = 39.3%. That group figure has no economic reality of its own: it is the weighted average of three models with margins between 30 and 75 percent. If trade revenue grows by half a million next year and everything else stays flat, the total margin drops to 38.4% without a single contract being renegotiated.
Margin versus markup
A purchase price of € 100 and a selling price of € 125 gives a markup of 25% on cost, but a margin of 20% on the sale. Anyone who mixes up the two structurally under-prices.
Margin = markup ÷ (1 + markup) and conversely markup = margin ÷ (1 − margin). A target margin of 40% therefore requires a markup of 66.7% on the purchase price, not of 40%.
Sales teams almost always think in markup and reporting almost always speaks in margin. Record which of the two drives the price list and which drives the report, and put the conversion in the quotation template instead of in a salesperson's head.
What is a good gross margin?
There is no universal benchmark, because the percentage is largely set by the business model and by where you draw the cost of sales line. As a rough order of magnitude:
- Wholesale and distribution: 15% to 25%.
- Manufacturing and assembly: 25% to 40%.
- Installation, construction and projects: 20% to 35%.
- Professional services: 40% to 60%.
- Software and SaaS: 70% to 85%.
Treat these ranges as indicative rather than normative: they move by sector, by year and by cost definition. The two comparisons that always carry meaning are your own trend over twelve months and the margin on the same product group at direct competitors. A margin that slips half a percentage point for three consecutive quarters is a problem even when the absolute level still beats the sector.
Price, mix and purchasing
A margin variance has four practical causes, and separating them out before drawing conclusions from the total pays off:
- Price effect: the selling price fell, usually through discounts or tender pressure.
- Purchasing effect: the cost of goods rose while the price list stayed put.
- Mix effect: revenue shifted between product groups, as in the example above.
- Volume effect: moves gross profit in euros but leaves the percentage untouched — unless volume rebates move along with it.
Only the price and purchasing effects justify an intervention on pricing. Under a mix effect the margin per product group has not moved at all, and the conversation belongs with commercial steering instead. Running the gross margin calculation per product group rather than at group level makes that distinction visible immediately.
Pitfalls in the gross margin calculation
- Using purchases instead of the cost of goods sold. Without the inventory movement the monthly margin follows the purchasing rhythm and says nothing.
- A cost definition that differs per entity. If inbound freight sits in cost of sales in one entity and in overhead in another, the consolidated percentage is meaningless.
- Leaving intercompany revenue in. In a group with internal deliveries the internal margin counts twice until consolidation eliminates it.
- Volume rebates that only land in December. An annual rebate that is not accrued monthly depresses eleven months and artificially lifts the twelfth.
- Keeping direct labour out of cost of sales. In projects and services the real margin then disappears into personnel costs and you steer on a percentage that only covers materials.
Frequently asked questions
How does the gross margin calculation work?
Subtract the cost of goods sold from net revenue and divide the result by that net revenue, then multiply by 100. Use the cost of what was actually sold, including the inventory movement, rather than the total of supplier invoices.
What is the difference between gross profit and gross margin?
Gross profit is an amount in euros; gross margin is that same amount as a percentage of revenue. A growing company can combine rising gross profit with a falling margin, which is precisely the signal that volume is masking price pressure.
What is the difference between gross margin and net profit margin?
Gross margin looks only at the costs tied directly to revenue. Net profit margin also deducts operating expenses, interest, depreciation and tax. A high gross margin alongside a thin net margin points to an overweight overhead structure rather than to a commercial problem.
Is a higher gross margin always better?
No. A high margin on a small volume yields less gross profit than a thin margin on a large volume; fixed costs are paid with euros, not with percentages. Always read the margin together with the absolute amount and with inventory turnover.
Margin in your monthly reporting
The arithmetic is simple; producing it reliably every month, per product group and across all entities, is not. In Smartbooks you create a "Gross Margin" subfolder in the account structure and drag the revenue and cost of sales accounts into it, so the subtotal is formed automatically. The percentage is added as a metric and placed with a dynamic addition directly beneath that line in the profit and loss statement, at consolidated level as well. The cost centre selector in the report configuration then shows the same margin per product group or location, without building a second report.
More formulas and benchmarks from this series are in the knowledge center, or see how reporting is structured.
Related articles
Working capital: calculation, formula and benchmarks
August 21, 2026
Solvency ratio: how to calculate it, formula and benchmarks
August 18, 2026
Current ratio: formula, benchmark and worked example
August 18, 2026
Cash flow calculation: formula, methods and example
September 2, 2026
Cash Budget: Structure, Formula and a Worked Example
August 26, 2026
Customer Case Intermax
April 21, 2026