All Tools

Contribution Margin Calculator

Work out what each sale contributes once its variable costs come off: contribution margin per unit, the contribution margin ratio, and how many units it takes to cover your fixed costs.

What is contribution margin?

Contribution margin is the selling price minus the variable costs of the sale: the costs that rise and fall with every unit sold, such as product cost, shipping and payment fees. It is what each sale contributes towards fixed costs and then profit. The contribution margin ratio is the same figure as a share of the price.

One unit, every variable cost

Enter the numbers for one unit. Selling online? Treat one order as one unit: use your average order value and the costs of an average order. Leave any line that does not apply empty.

Price and product cost

What one unit sells for, and what the product itself costs you to buy or make.

Costs of each sale

Everything else that comes with each sale: shipping and fulfilment, payment fees, refunds and other per-unit costs.

Marketing

Ad spend per unit sold. Leave it empty to see contribution margin before marketing.

Volume and fixed costs

Optional. Add fixed costs to find your break-even point, and units per month for a monthly view.

The formula

How contribution margin is calculated

Contribution margin per unit = Price - Variable costs per unit; Contribution margin ratio = Contribution margin per unit / Price; Break-even units = Fixed costs / Contribution margin per unit

With only a price and a product cost, the calculator gives the textbook answer. Each extra variable cost you enter comes off in a layer, CM1 to CM3, so you can see what each one takes.

Price
What one unit sells for. For an online store, use the average order value.
Variable costs per unit
Every cost that grows with each unit sold: product cost, shipping and fulfilment, payment fees, refunds, other per-unit costs and marketing.
Payment fees
Price x payment fee rate + fixed fee per transaction.
Refunds
Price x refund rate: the revenue expected to go back to customers on each unit.
CM1, CM2, CM3
Price minus product cost; then minus the other costs of each sale; then minus marketing. CM3 is the contribution margin per unit.
Fixed costs
Monthly costs that do not change with volume: rent, salaries, software and your store plan.
Break-even revenue
Fixed costs / Contribution margin ratio: the monthly revenue at which contribution covers fixed costs.
Break-even ROAS
Price / CM2: the return on ad spend at which marketing uses up everything a sale leaves before marketing.
  • Break-even units are rounded up to a whole unit, because part of a unit does not cover the rest of your fixed costs.
  • Refunds count the price going back to the customer while every cost is already spent. Return postage and restocking add to the cost; returned stock you can resell reduces it.
  • Payment fees are charged on the selling price only. Nothing is pre-filled, so enter your own provider's rate.

Worked examples

Three contribution margin calculations, worked through

Each example follows the same steps as the calculator above. The amounts work in any currency.

Example 1

The textbook case: price minus variable cost

A product sells for 80.00 and its variable costs come to 48.00 per unit. The business has 12,000 of fixed costs a month.

Inputs

Selling price
80.00
Variable costs per unit
48.00
Fixed costs per month
12,000

Working

  1. Contribution margin per unit: 80.00 - 48.00 = 32.00
  2. Contribution margin ratio: 32.00 / 80.00 = 40.0%
  3. Break-even units: 12,000 / 32.00 = 375 units a month
  4. Break-even revenue: 12,000 / 40% = 30,000 a month

Contribution margin

32.00 per unit (40.0%)

Each unit pays 32.00 towards fixed costs. The 375th unit of the month covers the last of them, and every unit after it adds 32.00 to profit.

Example 2

One online order, in three layers

An order averages 60.00. The products in it cost 22.00, shipping and fulfilment 8.00 and packaging inserts 1.00, and the payment provider charges 2.9% + 0.30. 4% of orders are refunded, and ads cost 12.00 per order.

Inputs

Selling price (average order)
60.00
Product cost (COGS)
22.00
Shipping and fulfilment
8.00
Payment fee
2.9% + 0.30
Refund rate
4%
Other variable costs
1.00
Marketing per order
12.00

Working

  1. CM1: 60.00 - 22.00 = 38.00, which is 63.3% of the order
  2. Payment fees: 60.00 x 2.9% + 0.30 = 2.04; expected refunds: 60.00 x 4% = 2.40
  3. CM2: 38.00 - 8.00 - 2.04 - 2.40 - 1.00 = 24.56, which is 40.9% of the order
  4. CM3: 24.56 - 12.00 = 12.56, which is 12.56 / 60.00 = 20.9% of the order
  5. Break-even ROAS: 60.00 / 24.56 = 2.44x

Contribution margin (CM3)

12.56 per order (20.9%)

A 63.3% product margin becomes 20.9% once delivery, fees, refunds and ads come off. Ads could cost up to 24.56 per order, a 2.44x ROAS, before the order stops contributing anything.

Example 3

From contribution margin to break-even point

A product sells for 50.00 and costs 18.00. Shipping and fulfilment cost 6.00, the payment provider charges 2.9% + 0.30, 2% of units are refunded and ads cost 9.00 per unit. Fixed costs are 9,000 a month and the store sells 1,000 units a month.

Inputs

Selling price
50.00
Product cost (COGS)
18.00
Shipping and fulfilment
6.00
Payment fee
2.9% + 0.30
Refund rate
2%
Marketing per unit
9.00
Fixed costs per month
9,000
Units sold per month
1,000

Working

  1. Payment fees: 50.00 x 2.9% + 0.30 = 1.75; expected refunds: 50.00 x 2% = 1.00
  2. Contribution margin: 50.00 - 18.00 - 6.00 - 1.75 - 1.00 - 9.00 = 14.25, a 28.5% contribution margin ratio
  3. Break-even units: 9,000 / 14.25 = 631.6, rounded up to 632 units a month, or 31,578.95 of revenue
  4. At 1,000 units: 1,000 x 14.25 = 14,250 of contribution, minus 9,000 of fixed costs = 5,250 of operating profit
  5. Margin of safety: (1,000 - 631.6) / 1,000 = 36.8% above break-even

Break-even point

632 units a month

Sales could fall 36.8% before fixed costs stop being covered. Adding 1.00 to the contribution per unit would bring break-even down by about 41 units.

The guide

Contribution margin for online stores

CM1, CM2 and CM3: contribution margin in layers

Online retailers often report contribution margin in three layers, each taking off one more group of variable costs. The calculator above follows the same split.

CM1: after product cost

Revenue minus what the product costs you. It shows whether a product is priced sensibly against its cost, and for a store that buys in finished stock it is close to gross margin.

CM2: after the costs of each sale

CM1 minus shipping and fulfilment, payment fees, refunds and other per-order costs. It is the most a sale can spend on marketing and still break even, which is why break-even ROAS is built on it.

CM3: after marketing

CM2 minus the ad spend it took to win the sale. This is the contribution margin that has to cover your fixed costs, and the one to watch as you scale ad budgets.

Teams draw these lines a little differently, and some put fulfilment in CM1. The split matters less than using the same one every month, so the numbers stay comparable.

Contribution margin vs gross margin

Gross margin subtracts cost of goods sold, which can include fixed production overheads. Contribution margin subtracts only costs that change with each sale, including selling costs such as shipping, payment fees and refunds that gross margin leaves out. For an online store that buys in its stock, product cost is almost entirely variable, so contribution margin sits below gross margin by everything else it takes off. The Shopify profit margin calculator shows gross, contribution and net margin side by side for one Shopify order.

From contribution margin to break-even point

Fixed costs are paid whether you sell ten units or ten thousand. Dividing them by the contribution margin per unit gives the units you need to sell each month to cover them; dividing them by the contribution margin ratio gives the revenue you need. Below that point the business loses money however healthy each sale looks. Past it, every extra unit adds its full contribution margin to profit.

Contribution margin and break-even ROAS

CM2 is the ceiling on what one sale can spend on advertising. Divide the price by CM2 and you get break-even ROAS: the return on ad spend at which a campaign stops losing money. The break-even ROAS calculator works through it in more detail, including how refunds and fees move the threshold.

Which costs are variable for an online store?

A cost is variable if it changes with the number of units you sell. Most of an online store's costs of sale are, but a few common ones are not.

Product cost

What you pay to buy or make each unit. If you import stock, landed cost (freight, duties and insurance spread across the units) belongs here too.

Shipping and fulfilment

Postage, packaging and a 3PL's per-order pick-and-pack fee. Warehouse storage is usually billed by the month, which makes it a fixed cost.

Payment fees

The percentage and the fixed fee your payment provider takes on every transaction.

Refunds and returns

Revenue you hand back on refunded orders, plus return postage if you pay for it.

Marketing

Online stores usually treat ad spend as variable, because it rises and falls with the orders they buy. Brand campaigns you would run anyway behave more like fixed costs.

Not variable

Rent, salaries, software subscriptions and your store platform plan stay the same from one order to the next. They are fixed costs and belong below the contribution margin line.

In MerchantFlow

Contribution margin on every order you sync

MerchantFlow connects to your Shopify or WooCommerce store and your ad accounts and works out profit on each order: product cost from your COGS, payment fees, shipping and fulfilment, and ad spend from Meta, Google, TikTok and Snapchat, with refunds netted out. Your P&L then takes off your fixed costs for net profit.

See the real-time P&L

Common Questions

Contribution margin: FAQ

How do you calculate contribution margin?

Take the selling price and subtract every variable cost of the sale. Per unit, that is the selling price per unit minus the variable cost per unit; in total, it is revenue minus total variable costs. Divide the result by the price, or by revenue, to get the contribution margin ratio.

What is the contribution margin ratio?

It is contribution margin as a percentage of the selling price. A 40% ratio means 40 of every 100 in revenue is left after variable costs to pay fixed costs and then profit. Dividing fixed costs by the ratio gives the revenue you need to break even.

What is contribution margin per unit?

The selling price of one unit minus the variable costs of that unit. Multiply it by the units sold to get total contribution margin, or divide fixed costs by it to get the units needed to break even. For an online store the natural unit is usually one order.

What is the difference between contribution margin and gross margin?

Gross margin takes cost of goods sold off revenue. Contribution margin takes off every cost that varies with sales, including shipping, payment fees, refunds and usually marketing, but leaves out fixed costs even when they sit inside cost of goods sold. For a store that buys in finished stock, contribution margin is the lower of the two.

Is advertising a variable cost?

In traditional accounting, advertising is usually a fixed period cost. Online stores that win most of their orders through paid ads tend to treat it as variable, because spend rises with the orders they buy. The calculator shows both views: CM2 before marketing and CM3 after it.

What is a good contribution margin?

There is no benchmark that holds across businesses: it depends on your price point, your category and how you win customers. The tests that matter are your own. Contribution margin must stay positive after marketing, and total contribution each month must cover your fixed costs with room to spare. The lower the ratio, the more revenue it takes to cover the same fixed costs.

What is a contribution margin income statement?

An income statement that groups costs by how they behave rather than by department: revenue minus variable costs equals contribution margin, and contribution margin minus fixed costs equals operating profit. The table in the calculator above is one, per unit and, once you enter units sold, per month.

What is weighted average contribution margin?

When you sell more than one product, it is the average contribution margin per unit across the range, with each product weighted by its share of units sold. Divide fixed costs by it to get a break-even point for the whole business rather than for a single product. It moves whenever your sales mix moves, so recalculate it when your best-sellers change.