---
title: "Contribution margin calculator: formula, ratio and examples"
url: "https://www.datafuji.com/en/tools/contribution-margin-calculator"
lang: en
translations:
  fr: "https://www.datafuji.com/outils/marge-sur-cout-variable"
  pt-BR: "https://www.datafuji.com/pt-br/ferramentas/margem-de-contribuicao"
  es: "https://www.datafuji.com/es/herramientas/margen-de-contribucion"
  de: "https://www.datafuji.com/de/tools/deckungsbeitrag-rechner"
  it: "https://www.datafuji.com/it/strumenti/margine-di-contribuzione"
updated: 2026-12-01
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://www.datafuji.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

- [Home](https://www.datafuji.com/en)

- [Tools](https://www.datafuji.com/en/tools)

- Contribution margin calculator

# Contribution margin: formula, ratio, examples and free calculator

Published December 1, 2026 · Updated December 1, 2026 · 11 min read

[Dylan Arnaud](https://www.datafuji.com/en/about#dylan-arnaud), founder of Datafuji

Contribution margin is the revenue left from a sale once its variable costs are paid: the amount each sale contributes to covering fixed costs, then to profit. It equals revenue minus variable costs, per unit or in total, and becomes the contribution margin ratio when divided by revenue.

Example: a product sold for €100 with €75 of variable costs has a €25 unit contribution margin, a 25% ratio.

## Calculate your contribution margin by product line

The calculator gives the contribution margin of each product line, its share of the total, the weighted contribution margin ratio, profit and break-even revenue. Nothing you enter leaves your browser.

Enter, for each line, the units sold over the period, the price per unit and the variable cost per unit, all excluding sales tax, then the fixed costs of the same period, in thousands of euros. The default values are those of the fictitious company in the example.

Calculator · your figures stay in your browser

Product line

Units sold

Price per unit (€)

Variable cost per unit (€)

Product line

Units sold

Price per unit (€)

Variable cost per unit (€)

Product line

Units sold

Price per unit (€)

Variable cost per unit (€)

Fixed costs for the period (€k)

Total contribution margin

€4,800k

on €12,000k of revenue

Contribution margin ratio

40.0%

weighted by the sales mix

Profit

€1,200k

after fixed costs

Break-even revenue

€9,000k

at the current mix

Contribution margin by product line

| Line | Unit CM | CM ratio | Total CM | Share of revenue | Share of CM |
| --- | --- | --- | --- | --- | --- |
| Goods | €25.00 | 25.0% | €2,000k | 66.7% | 41.7% |
| Services | €140.00 | 70.0% | €2,800k | 33.3% | 58.3% |

Each €100 of sales leaves €40 to cover fixed costs. Fixed costs are covered with a margin of safety of €3,000k, and profit is €1,200k. Services: 33.3% of revenue, but 58.3% of contribution margin.

## What is contribution margin?

Contribution margin is what each sale leaves once the costs it triggers are paid. That amount first covers fixed costs; once they are covered, every additional dollar or euro of contribution margin is profit.

The idea rests on sorting costs by behavior. Variable costs rise and fall with the volume sold: goods purchased for resale, materials, subcontracting, outbound freight, sales commissions, credit card processing fees. Fixed costs stay the same over the period whatever the volume: rent, salaried staff, software subscriptions, insurance, depreciation.

The company in our example is fictitious, and the same one appears on our [break-even calculator](https://www.datafuji.com/en/tools/break-even-calculator), which shows the revenue at which its contribution margin covers its fixed costs. It sells €12,000k a year excluding sales tax (€k: thousands of euros) through two product lines:

- Goods: 80,000 units resold at €100, bought for €75 each, inbound freight included.

- Services: 20,000 hours billed at €200, with €60 of variable costs per hour (subcontractors, travel and commissions).

Its fixed costs are €3,600k a year. The figure below follows its revenue down to profit.

![Stacked bars on the same scale. Revenue of €12,000k splits into €7,200k of variable costs and €4,800k of contribution margin, a 40% ratio. The €4,800k of contribution margin splits into €3,600k of fixed costs and €1,200k of profit.](https://www.datafuji.com/img/en/outils-marge-sur-cout-variable/outils-marge-sur-cout-variable-01.svg)

*Of €12,000k of sales, €4,800k is left after variable costs; fixed costs take €3,600k of it.*

Read the chart in the order of a sale: variable costs come off every sale, and what remains pays fixed costs before anything becomes profit. That order explains why profit reacts so strongly to volume.

### Contribution margin per unit, total and ratio

The same margin is expressed three ways, each for its own question:

- Unit contribution margin, in currency per unit: what one more unit brings in. For goods, €100 − €75 = €25.

- Total contribution margin, for a period: the amount available for fixed costs. For goods, 80,000 × €25 = €2,000k.

- Contribution margin ratio, in percent of revenue: what each €100 of sales leaves. For goods, 25 ÷ 100 = 25%.

The unit view shows why the two lines behave so differently.

![Two price bars split into variable cost and contribution margin. Goods: a €100 price, €75 of variable cost and a €25 contribution margin, a 25% ratio. Services: a €200 hourly price, €60 of variable cost and a €140 contribution margin, a 70% ratio.](https://www.datafuji.com/img/en/outils-marge-sur-cout-variable/outils-marge-sur-cout-variable-02.svg)

*An hour of services leaves €140, a unit of goods €25.*

An hour of services leaves almost six times as much as a unit of goods. The ratio says the same in relative terms: 70% against 25%.

## How do you calculate contribution margin?

Subtract variable costs from revenue: per unit, it is price minus variable cost per unit; in total, revenue minus all variable costs. Divide by revenue for the ratio.

Unit contribution margin = price − variable cost per unit = 100 − 75 = €25 Total contribution margin = units × unit CM = 80,000 × 25 = €2,000,000, or €2,000k Contribution margin ratio = contribution margin ÷ revenue = 2,000 ÷ 8,000 = 25%

The contribution margin ratio formula is therefore contribution margin ÷ revenue, per unit or in total: €25 ÷ €100 gives the same 25% as €2,000k ÷ €8,000k. The other formulas used on this page follow from these three:

| Metric | Formula | Example company |
| --- | --- | --- |
| Total contribution margin | Revenue − total variable costs | 12,000 − 7,200 = €4,800k |
| Weighted contribution margin ratio | Total CM ÷ total revenue | 4,800 ÷ 12,000 = 40% |
| Profit | Total CM − fixed costs | 4,800 − 3,600 = €1,200k |
| Break-even revenue | Fixed costs ÷ CM ratio | 3,600 ÷ 0.40 = €9,000k |
| Variable cost ratio | Variable costs ÷ revenue, or 1 − CM ratio | 7,200 ÷ 12,000 = 60% |

These formulas come from management accounting, under the name of variable costing or cost-volume-profit analysis; no accounting standard defines them. The free OpenStax textbook Principles of Managerial Accounting presents them in the same way.

### Worked example: the company’s two lines

This exercise uses the calculator’s default values. It asks for the contribution margin of each line, the company’s weighted ratio and the share of each line in the total.

| Line | Revenue | Variable costs | Contribution margin | CM ratio |
| --- | --- | --- | --- | --- |
| Goods: 80,000 units at €100 | €8,000k | €6,000k | €2,000k | 25% |
| Services: 20,000 hours at €200 | €4,000k | €1,200k | €2,800k | 70% |
| Company | €12,000k | €7,200k | €4,800k | 40% |

The solution, step by step:

- Goods: (100 − 75) × 80,000 = €2,000k, or 25% of its €8,000k of revenue.

- Services: (200 − 60) × 20,000 = €2,800k, or 70% of €4,000k.

- Weighted ratio: (2,000 + 2,800) ÷ 12,000 = 40%. It is not the simple average of 25% and 70%, which would give 47.5%: each line weighs in proportion to its revenue.

- Shares: goods bring 66.7% of revenue (8,000 ÷ 12,000) but 41.7% of contribution margin (2,000 ÷ 4,800); services, 33.3% and 58.3%.

The weighted ratio is what textbooks call the weighted average contribution margin. Expressed per unit, it only makes sense when every line is counted in the same unit, which is not the case here: units of goods and hours of services cannot be added up.

### The contribution margin income statement

The contribution margin income statement presents the same year by cost behavior. Each line gets its own column, so you see which one pays for the fixed costs.

| €k | Goods | Services | Company |
| --- | --- | --- | --- |
| Revenue | 8,000 | 4,000 | 12,000 |
| − Variable costs | 6,000 | 1,200 | 7,200 |
| = Contribution margin | 2,000 | 2,800 | 4,800 |
| − Fixed costs | – | – | 3,600 |
| = Profit | – | – | 1,200 |

Fixed costs stay in the company column on purpose. Rent, management salaries and the software stack serve both lines, and any split between them would be a convention, not a measurement.

### Calculation mistakes that skew it

- Leaving out variable selling costs. Commissions, credit card processing fees, outbound freight and marketplace fees vary with each sale. Leaving them out flatters the margin of the lines that use them most.

- Averaging the ratios. The simple average of 25% and 70% gives 47.5%, against a true 40%. Always divide total contribution margin by total revenue.

- Mixing amounts with and without sales tax. Revenue and costs are taken excluding sales tax or VAT, which is collected on behalf of the government and is not margin.

- Treating every salary as fixed, or every salary as variable. Hourly staff paid by volume are variable; a salaried team is fixed in the short term. Classify each payroll line by how it behaves, then stick to the rule.

## What is the difference between gross margin and contribution margin?

Gross margin deducts the cost of goods sold, which can include fixed production costs; contribution margin deducts every variable cost, including selling costs, and no fixed cost at all.

The two figures answer different questions. Gross profit, the first subtotal of a published income statement, says how much a business earns on what it sells after the cost of making or buying it. Contribution margin says how much one more sale brings in, which is what decisions on price, volume and mix need.

The example company shows the gap. On its goods, the cost of goods sold is the €6,000k paid to suppliers. Its services have no cost of goods sold in its accounts: their subcontractors, travel and commissions are recorded as operating expenses.

![Waterfall from revenue to contribution margin. Revenue €12,000k minus €6,000k of cost of goods sold gives a gross margin of €6,000k, 50% of revenue. Minus €1,200k of other variable costs (subcontractors, travel and commissions on services) gives a contribution margin of €4,800k, 40%.](https://www.datafuji.com/img/en/outils-marge-sur-cout-variable/outils-marge-sur-cout-variable-03.svg)

*Gross margin shows 50%; once all variable costs are deducted, 40% is left.*

Using the 50% gross margin instead of the 40% contribution margin ratio would set break-even at €7,200k instead of €9,000k. The €1,200k of variable costs that gross margin leaves out is spent with every hour sold.

Under IFRS and US tax rules

In manufacturing, the gap can run the other way. Inventory is valued at full production cost, fixed production overhead included. IAS 2 calls for “a systematic allocation of fixed and variable production overheads,” and the US tax rules on manufacturers’ inventories require the “full absorption” method. A plant’s depreciation and its supervisors’ salaries then sit inside the cost of goods sold, and so inside gross margin. Contribution margin leaves them with fixed costs. That is why the contribution margin income statement stays an internal management report; the OpenStax textbook notes that it is used for internal purposes only.

## How do you read contribution margin by product line?

Compare each line’s share of contribution margin with its share of revenue: the line that brings more margin than sales is the one that finances the fixed costs.

In the example, the gap is wide. Goods make up two thirds of the business but less than half of the margin.

![Two horizontal bars split by product line. Share of revenue: goods 66.7% (€8,000k), services 33.3% (€4,000k). Share of contribution margin: goods 41.7% (€2,000k), services 58.3% (€2,800k).](https://www.datafuji.com/img/en/outils-marge-sur-cout-variable/outils-marge-sur-cout-variable-04.svg)

*Services are a third of revenue but bring 58% of the contribution margin.*

Revenue rankings and margin rankings rarely agree. A sales team paid on revenue earns as much on €100 of goods as on €100 of services, although the services leave €70 of margin against €25. A shift of €1,000k of sales from services to goods, at the same total revenue, costs 1,000 × (70% − 25%) = €450k of margin.

### Should you drop a line that looks unprofitable?

Not on the strength of an allocated profit. Suppose the company spreads its €3,600k of fixed costs in proportion to revenue: €2,400k for goods and €1,200k for services. Goods then show a loss of €400k (2,000 − 2,400), and stopping them looks like a gain.

![Two scenarios. Allocated view: goods show €2,000k of contribution margin minus €2,400k of allocated fixed costs, a €400k loss. If goods are dropped: services keep €2,800k of contribution margin, but fixed costs stay at €3,600k, so profit falls from €1,200k to a loss of €800k.](https://www.datafuji.com/img/en/outils-marge-sur-cout-variable/outils-marge-sur-cout-variable-05.svg)

*Dropping the “loss-making” line turns a €1,200k profit into an €800k loss.*

The €2,000k of margin disappears with the goods; the rent, the management team and the software do not. Dropping a line pays only if the fixed costs it actually removes exceed its contribution margin. Here, the company would need to cut more than €2,000k of fixed costs.

### A negative contribution margin is the real alarm

A line whose variable cost exceeds its price loses money on every unit, and more volume makes it worse. It is the one case where the calculator flags a line in orange: reprice it, renegotiate the purchase, or stop it, unless it brings in other business that is clearly profitable.

## Is a 30% contribution margin good?

It depends on fixed costs: a contribution margin ratio is good when it covers fixed costs with room for profit. For the example company, 30% is exactly break-even.

Public statistics do not give contribution margin ratios by industry, because published accounts do not sort costs into fixed and variable. The ratio you need follows from your own figures instead:

Required CM ratio = (fixed costs + target profit) ÷ revenue = (3,600 + 1,800) ÷ 12,000 = 45%

The company’s fixed costs alone weigh 30% of revenue (3,600 ÷ 12,000). At a 30% ratio, it would earn nothing; its 40% ratio leaves 10% as profit, and a €1,800k profit target would require 45%. A software company carries heavy fixed costs and needs a high ratio; a wholesaler with few fixed costs can live on a thin one.

Gross margin is the closest public benchmark. NYU Stern professor Aswath Damodaran publishes gross margins by industry for listed US companies; his January 2026 data give:

| Industry (US listed companies) | Companies | Gross margin | Net margin |
| --- | --- | --- | --- |
| Software (system and application) | 309 | 71.72% | 25.49% |
| Machinery | 105 | 37.47% | 10.58% |
| Business and consumer services | 155 | 33.38% | 7.03% |
| Retail (general) | 23 | 33.18% | 5.61% |
| Retail (distributors) | 62 | 30.57% | 6.05% |
| Food wholesalers | 13 | 15.44% | 1.17% |
| Total market, excluding financials | 4,822 | 34.39% | 8.56% |

Read those figures as an upper bound for a reseller and as a rough order of magnitude elsewhere: they include fixed production overhead in manufacturing and leave out variable selling costs everywhere.

## How does contribution margin relate to the break-even point?

Break-even revenue is fixed costs divided by the contribution margin ratio: the level of sales whose contribution margin exactly covers fixed costs.

For the company, €3,600k ÷ 40% = €9,000k, or €3,000k below its €12,000k of revenue.

Break-even depends on the mix. If €1,000k of sales moves from services to goods, the weighted ratio falls from 40% to 36.25% and break-even rises to €9,931k without any loss of revenue. The [break-even page](https://www.datafuji.com/en/tools/break-even-calculator) calculates the break-even date and the margin of safety, and shows the effect of seasonality and operating leverage.

## How do you improve contribution margin?

Three levers raise it: price, variable cost per unit and mix. Volume raises the total but not the ratio, and it is usually the most expensive lever to pull.

Price works hardest on a thin-margin line. A 5% increase on goods, from €100 to €105, raises their unit margin from €25 to €30. That is +€400k of contribution margin at the same volume (80,000 × 5), and profit rises from €1,200k to €1,600k.

To earn the same €400k through volume, the company would have to sell 16,000 more units of goods (400,000 ÷ 25), or 20% more. Every euro of price passes straight to margin; a unit of volume brings only its €25 margin.

- Variable cost. A purchase price renegotiated from €75 to €73 adds €2 per unit, or €160k on 80,000 units.

- Mix. Each €100 of sales shifted from goods to services adds €45 of margin (70 − 25).

- Discounts. A 10% discount on goods takes the price to €90 and the unit margin from €25 to €15: the volume would have to rise by two thirds (25 ÷ 15 = 1.67) to keep the same margin.

The [margin calculator](https://www.datafuji.com/en/tools/margin-calculator) converts a target margin into a selling price, and the [cost price calculator](https://www.datafuji.com/en/tools/cost-price-calculator) builds the full cost of a product, fixed costs included.

## How do you track contribution margin every month?

Classify costs into fixed and variable once, account by account, then recalculate contribution margin by line at every month-end close from the sales and cost data.

In Power BI, three [DAX](https://www.datafuji.com/en/dax) measures are enough once each sales row carries its quantity, its price and its variable cost per unit:

Revenue = SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] ) Contribution Margin = SUMX ( Sales, Sales[Quantity] * ( Sales[Unit Price] - Sales[Unit Variable Cost] ) ) CM % = DIVIDE ([Contribution Margin], [Revenue] )

DIVIDE returns a blank instead of an error for a line with zero revenue. Sliced by product, customer or sales rep, the measures show each line’s margin and the weighted ratio, which no average of percentages can give.

A Power BI [financial dashboard](https://www.datafuji.com/en/financial-dashboard) puts them next to revenue and profit. The [cost accounting guide](https://www.datafuji.com/en/cost-accounting) covers how to classify costs, and the [profit and loss guide](https://www.datafuji.com/en/profit-and-loss) shows the monthly P&L they come from.

Variable costs per unit change during the year: a supplier increase, a new freight rate. Store them with effective dates in the model, so that each month’s margin uses the cost of that month and not today’s.

## Frequently asked questions

### Is contribution margin the same as profit?

No. Contribution margin is what is left after variable costs only; profit also deducts fixed costs such as rent, salaried staff and depreciation. The example company earns a €4,800k contribution margin but a €1,200k profit, because €3,600k of fixed costs come out first. A positive contribution margin can still end in a loss.

### Can contribution margin be negative?

Yes, when the variable cost of a unit exceeds its selling price, for example after a supplier price increase that was not passed on, or a heavy discount. Every unit sold then reduces profit, and selling more makes it worse. Unless the sale brings in other profitable business, such a line should be repriced or stopped.

### Is direct labor a variable cost?

Only if it varies with volume. Hourly or piece-rate pay, temporary staff and overtime usually do. Salaried employees paid the same whatever the output are a fixed cost in the short term, even when they work on production. Classify each payroll line by how it actually behaves, and keep the rule from month to month.

### How do you calculate contribution margin in Excel?

Put units in B2, price in C2 and variable cost per unit in D2. Unit contribution margin in E2 is =C2-D2, total contribution margin in F2 is =B2*E2 and the ratio in G2 is =E2/C2. With one row per product line, the weighted ratio is =SUM(F2:F3)/SUMPRODUCT(B2:B3,C2:C3). The example gives 40%.

### What is a contribution margin income statement?

It is an income statement that sorts costs by behavior instead of by function: revenue, minus all variable costs, equals contribution margin; minus fixed costs, equals profit. It is an internal management report: IFRS (IAS 2) has published statements value a manufacturer’s inventory with fixed production overhead included, and US tax rules require the same for tax inventories.

Sources

- OpenStax (Rice University), [Principles of Managerial Accounting, 3.1 Explain Contribution Margin and Calculate Contribution Margin per Unit, Contribution Margin Ratio, and Total Contribution Margin](https://openstax.org/books/principles-managerial-accounting/pages/3-1-explain-contribution-margin-and-calculate-contribution-margin-per-unit-contribution-margin-ratio-and-total-contribution-margin) (definitions of unit contribution margin, contribution margin ratio and total contribution margin; contribution margin income statement for internal use), February 14, 2019, accessed November 29, 2026.

- IFRS Foundation, [IAS 2 Inventories](https://www.ifrs.org/issued-standards/list-of-standards/ias-2-inventories/) (paragraph 12: “a systematic allocation of fixed and variable production overheads”; paragraph 13: allocation on normal capacity; full text free with an IFRS Foundation account), 2026 issued standards, accessed November 29, 2026.

- Legal Information Institute (Cornell Law School), text of the Code of Federal Regulations, [26 CFR § 1.471-11, Inventories of manufacturers](https://www.law.cornell.edu/cfr/text/26/1.471-11) (paragraph (a), “full absorption” method; paragraph (b)(1), fixed and variable indirect production costs), accessed November 29, 2026.

- Aswath Damodaran, NYU Stern School of Business, [Operating and Net Margins by Industry Sector (US)](https://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/margin.html) (gross and net margins by industry, data as of January 2026), accessed November 29, 2026.

- Microsoft Learn, [DIVIDE function (DAX)](https://learn.microsoft.com/en-us/dax/divide-function-dax) (“returns alternate result or BLANK() on division by 0”), updated April 25, 2024, accessed November 29, 2026.

---

Datafuji knowledge base, open to agents and AI: every page is available in Markdown (add .md to its URL), in French, English (/en/), Brazilian Portuguese (/pt-br/), Spanish (/es/) and German (/de/).

- Search: https://www.datafuji.com/.well-known/search?q={query}
- Site index: https://www.datafuji.com/llms.txt
