Contribution margin is the revenue left after you subtract every cost that rises and falls with sales. The formula is contribution margin = revenue - variable costs. Per unit it is the selling price minus the variable cost of one unit, and as a ratio it is the contribution margin divided by revenue. What is left pays your fixed costs first; anything beyond that is operating profit.
For an online store, the variable costs go well beyond the purchase price: payment fees, marketplace commission, shipping, packaging, returns and usually the ad spend that brought the order in. That is why a product with a healthy 65% gross margin can keep less than a quarter of its revenue once an order has been paid for, shipped and sometimes sent back. Below are the formulas, a worked webshop and marketplace example with real cost lines, the per-order view, and the product data you need to calculate it per SKU.
Contribution margin formula, ratio and unit contribution margin
Managerial accounting textbooks use three versions of the same idea. OpenStax Principles of Managerial Accounting defines the unit contribution margin as the sales price per unit minus the variable cost per unit, and the ratio as the unit contribution margin divided by the sales price. The Corporate Finance Institute writes the total as net sales revenue minus variable costs, and its example deducts variable selling costs as well as production costs.
- Contribution margin (total): revenue - total variable costs.
- Unit contribution margin: selling price per unit - variable cost per unit.
- Contribution margin ratio: contribution margin / revenue, shown as a percentage.
- Total from units: unit contribution margin x units sold.
A quick check with one stainless steel water bottle, 750 ml: it sells for EUR 40.00 excluding VAT and has variable costs of EUR 22.28 per order (EUR 14.00 landed cost, EUR 0.98 payment fee, EUR 5.50 shipping, EUR 1.80 packaging and picking). Its unit contribution margin is EUR 17.72 and its contribution margin ratio is 44.3%. Every amount in this post excludes VAT, because VAT is not your revenue.
Variable and fixed costs in a webshop P&L
The whole calculation depends on putting each cost in the right bucket. A cost is variable when one more order makes it go up. If it stays the same whether you ship 500 or 600 orders this month, it is fixed.
- Landed cost of the goods: purchase price plus freight, duty and other costs to get the product into your warehouse. Our landed cost guide shows how to allocate those per unit; using the bare supplier price makes every margin look better than it is.
- Payment fees: a percentage plus a fixed amount per transaction, charged on the amount the customer pays, which includes VAT.
- Marketplace commission: a percentage of the selling price, often with a fixed fee per item, and usually different per category.
- Shipping and fulfillment: the carrier label, packaging, and pick-and-pack labor or your fulfillment partner's per-order fee.
- Returns: return labels, inspection and repacking, goods you can no longer sell, and fees that are not refunded.
- Performance marketing: ad spend on campaigns that drive orders (shopping ads, paid social, sponsored products). It rises with volume, so most ecommerce teams treat it as variable.
- Fixed costs: salaries, rent, software subscriptions, agency retainers and brand campaigns that run regardless of sales volume.
Worked example: 100 webshop orders of a EUR 40 water bottle
This is an illustrative example, with round numbers chosen to make the steps easy to follow. Your own fees, carrier rates and return rate will differ. Take 100 orders of one bottle each, sold in your own webshop with free shipping:
- Price: EUR 40.00 excluding VAT (EUR 48.40 with 21% VAT).
- Landed cost: EUR 14.00 per bottle.
- Payment fee: 1.5% + EUR 0.25 on EUR 48.40, so EUR 0.98 per order, not refunded on returns.
- Outbound shipping: EUR 5.50 per order. Packaging and picking: EUR 1.80 per order.
- Returns: 8 of 100 orders come back and are refunded. Each costs EUR 7.00 for the return label and handling, and 2 of the 8 bottles can no longer be sold.
- Ad spend: EUR 600 on campaigns that brought in these orders, EUR 6.00 per order.
- Revenue: 92 kept orders x EUR 40.00 = EUR 3,680.
- Product costs: 92 bottles sold plus 2 written off = 94 x EUR 14.00 = EUR 1,316. CM1 = EUR 2,364, or 64.2% of revenue.
- Fulfillment, payment and returns: EUR 98 payment fees + EUR 550 shipping + EUR 180 packaging and picking + EUR 56 return handling = EUR 884. CM2 = EUR 1,480, or 40.2%.
- Marketing: EUR 600 ad spend. CM3 = EUR 880, or 23.9% of revenue, EUR 8.80 per order placed.
Note how much the shipping line costs relative to the product: EUR 5.50 is nearly 14% of the net price. On cheap products, free shipping often costs more contribution margin than the payment fee, the returns and the packaging together.
The same bottle on a marketplace with a 15% commission
Now sell the same 100 bottles through a marketplace (again illustrative). The marketplace collects the payment, so there is no separate payment fee, but it charges 15% commission on the VAT-inclusive price plus EUR 1.00 per item: EUR 8.26 per bottle. Assume the commission is refunded on returned items, you ship the orders yourself at the same rates, and you spend EUR 200 on sponsored product ads.
- Commission: 92 x EUR 8.26 = EUR 759.92.
- CM2: EUR 2,364 - EUR 759.92 commission - EUR 550 shipping - EUR 180 packaging - EUR 56 returns = EUR 818, or 22.2%.
- CM3: EUR 818 - EUR 200 ads = EUR 618, or 16.8% of revenue, EUR 6.18 per order.
Contribution margin per 100 bottle orders, webshop vs marketplace
Illustrative example| Category | Webshop | Marketplace |
|---|---|---|
| CM1 after product costs | €2,364 | €2,364 |
| CM2 after selling costs | €1,480 | €818 |
| CM3 after marketing | €880 | €618 |
The marketplace keeps EUR 2.62 less per order, but that does not settle the question by itself. If the marketplace brings orders your webshop would never get, those EUR 618 still pay fixed costs. Commission rates differ per category, so run this per product group, not with one average. The bol commission calculator does the fee part for bol.
Per unit or per order: why basket size changes the answer
Some costs belong to the unit (the bottle itself, the commission per item) and some to the order (the shipping label, the box, the fixed part of the payment fee). A unit contribution margin that loads a full shipping label onto every bottle understates what multi-item orders earn.
- One bottle per order: EUR 40.00 - EUR 14.00 - EUR 0.98 payment - EUR 5.50 shipping - EUR 1.80 packaging and picking = EUR 17.72.
- Two bottles per order: EUR 80.00 - EUR 28.00 - EUR 1.70 payment - EUR 5.50 shipping (same box) - EUR 2.20 packaging and picking = EUR 42.60, or EUR 21.30 per bottle.
Use the unit view to compare products and set price floors. Use the per-order view for decisions about shipping thresholds, bundles and minimum order values: a free shipping threshold set just above two bottles turns shipping from a per-unit cost into a per-order one.
Contribution margin vs gross margin vs markup
The three figures answer different questions and are easy to mix up. Markup and gross margin only look at the cost of the goods; our post on markup vs margin covers those two in depth. Contribution margin subtracts every variable cost.
Three margin measures on the same EUR 40 bottle
| Markup | (price - cost) / cost | Product cost only | 185.7% | Setting a price from a cost |
|---|---|---|---|---|
| Gross margin | (price - cost) / price | Product cost only | 65.0% | Comparing products and categories |
| Contribution margin ratio | (revenue - variable costs) / revenue | Product, payment, commission, shipping, returns, ads | 23.9% (webshop, 100 orders) | Channel, ad budget and break-even decisions |
Gross margin on an accounting income statement can also contain production overhead that is partly fixed, while contribution margin strictly separates variable from fixed. For a retailer that buys finished goods, the practical difference is the selling costs: gross margin stops before them, contribution margin includes them. The profit margin calculator gives gross and net margin from a price and a cost.
Four decisions that start from contribution margin
- Break-even volume. OpenStax gives break-even in units as total fixed costs divided by the contribution margin per unit. With EUR 12,000 fixed costs a month and EUR 8.80 contribution per order, you need 1,364 orders a month to break even. The break-even calculator runs this with your own figures.
- Maximum ad cost per order. CM2 is what an order can spend on advertising before it loses money: EUR 14.80 per order in the webshop example. That makes the break-even ROAS EUR 36.80 revenue / EUR 14.80 = 2.49, on revenue excluding VAT. Ad platforms often report revenue including VAT, so check which one your ROAS uses before comparing it with the ROAS calculator.
- Price floors per channel. A channel with 15% commission needs a higher price, or a higher minimum margin, than your own shop to keep the same contribution.
- Which SKUs to push. A product with a high gross margin but heavy, bulky shipping or a high return rate can contribute less than a cheaper, lighter one. Rank products on contribution, not on gross margin, before you put ad budget behind them.
Five errors that make contribution margin look healthier than it is
- Supplier price instead of landed cost. Freight, duty and inbound handling are variable costs of the goods. Leaving them out inflates every layer.
- Returns left out. A refunded order has no revenue but keeps its shipping, payment and handling costs. Track the rate per product with the return rate calculator and charge return costs to the products that cause them.
- Fees calculated on the net price. Payment fees and most marketplace commissions are charged on the price the customer pays, VAT included. On EUR 40.00 net that is EUR 0.98 instead of EUR 0.85 per order, small per order but real across a year.
- One average commission rate. Marketplace commission usually differs per category; a blended rate hides the categories that lose money.
- Ad spend booked as overhead. If campaign spend sits in fixed costs, every product looks profitable and the ad budget never gets questioned.
Cost fields each SKU needs for a contribution margin calculation
Contribution margin per product is only as good as the data behind it. Most stores have the selling price on every product and very little else. These fields let you calculate it per SKU and per channel instead of once a year from the P&L.
Product and channel data behind a contribution margin per SKU
Channel fees, cost prices and margin floors in WISEPIM
WISEPIM stores a cost price on every product, and the product list has a margin column calculated as (price - cost) / price, which is gross margin, not contribution margin. Under channel pricing you can add pricing rules that change prices at export per channel without touching the stored price, including cost plus margin rules and a minimum margin safeguard. For each channel you can also save a fee profile with the commission, a payment fee and a fixed fee per item; the Margin after fees report then shows per product what is left after those fees and the cost price, at the price the export sends, and flags products below a threshold or selling at a loss.
That report deducts channel fees, not shipping, returns or ad spend, and it applies the fee rates to the price excluding VAT, so it is a floor check rather than a full contribution margin per product. The margin page in WISEPIM analytics works per store and currency: it shows margin after product costs, after selling costs and after marketing for orders whose costs are all known, and says which costs are missing. Neither calculates contribution margin per SKU or per order, so keep the full calculation in your finance model and use the product data to keep its inputs correct.

