Contribution margin in ecommerce is what's left from an order after every cost that grows with that order: product, shipping and fulfilment, payment fees, discounts and returns. It's the money each order contributes toward marketing, fixed costs and profit. If you only track one number to decide whether to grow, track this one.
Revenue says how big the store is. Return on ad spend says how a campaign looks to the ad platform. Contribution margin says whether selling one more order makes you money, and how much you can afford to spend to get it.
What is contribution margin in ecommerce?
Contribution margin is order revenue minus variable costs. Variable means the cost appears because the order happened. Rent, salaries and software subscriptions don't count, because they'd be the same if you sold one fewer order. To run your own numbers, use our contribution margin calculator.
The formula:
Contribution margin = order revenue − product cost − shipping and fulfilment − payment fees − discounts − returns allowance
You can express it per order, as a dollar figure, or as a percentage of revenue. Both are useful. The dollar figure tells you how much room you have to acquire a customer. The percentage lets you compare products and periods.
How do you calculate contribution margin? A worked example
Here's an example with round, hypothetical numbers, not data from any real store. Picture a $60 order.
| Line | Amount | Running total |
|---|---|---|
| Order revenue | $60 | $60 |
| Product cost (landed, including freight) | −$18 | $42 |
| Pick, pack, packaging and shipping | −$10 | $32 |
| Payment processing | −$2 | $30 |
| Discounts and returns allowance | −$4 | $26 |
| Contribution margin before marketing | $26 (about 43%) |
That $26 is what this order brings in before you've paid anything to win it. If acquiring the buyer cost $15 in ads, the order leaves $11 toward fixed costs and profit. If it cost $30, the order lost $4.
Notice how far the number fell from the top line. Gross margin on this order is $42, or 70%. Contribution margin is $26. A founder looking at gross margin thinks they have $42 to spend acquiring the buyer. They have $26. That gap is where a lot of unprofitable ad spend comes from.
A low order value turns that gap into a trap. When we started with Mountain Ice, average order value sat below $20, which left almost no margin to bid against on paid traffic. Moving it to $39 created the headroom to scale spend.
What are CM1, CM2 and CM3?
Many operators split contribution margin into three layers. The labels vary between businesses, so define them once for your team and stick to it. A common version:
- CM1: after product cost. Revenue minus landed product cost. This is close to gross margin.
- CM2: after fulfilment and order costs. CM1 minus shipping, fulfilment, packaging, payment fees, discounts and returns. In the example, $26.
- CM3: after marketing. CM2 minus marketing spend. In the example, $11 if the order cost $15 to acquire.
Each layer answers a different question. CM1 asks whether the product is priced well against what it costs to make. CM2 asks whether the order is profitable to fulfil. CM3 asks whether growth, as you're currently buying it, makes money.
When CM3 is negative but CM2 is healthy, the problem is acquisition cost or first-order value. When CM2 is weak, no amount of ad optimisation will save you. Fix the order economics first.
Why is contribution margin the number behind growth decisions?
Because almost every growth decision is really a question about contribution. Four examples.
How much can you pay for a customer? Break-even return on ad spend for a first order is order revenue divided by contribution margin before marketing. In the example, $60 ÷ $26 is about 2.3. Below that, every first order loses money. Above it, it makes money. The platform's reported return on ad spend means nothing until you know this line.
Should you run a discount? A discount comes straight off contribution. In the example, a 20% sitewide discount takes $12 off a $26 contribution. That's almost half the order's contribution, gone, for a promotion that might only lift conversion a little.
Should you offer free shipping? Free shipping moves a cost from the buyer to you. It might be worth it. But it should be a decision you price, not a default you inherit.
Should you raise prices? A price rise flows almost entirely to contribution, because product and shipping costs don't change. In the example, a $6 price rise lifts contribution from $26 to roughly $32, a gain of nearly a quarter. Our post on ecommerce pricing strategy covers the break-even math in full.
Mountain Ice raised prices 20% once conversion was strong. Conversion settled from close to 7% to a steady 6%, and every order carried more contribution margin.
Contribution margin vs gross margin vs net profit
These three get confused constantly, and each answers a different question.
| Measure | Subtracts | Answers |
|---|---|---|
| Gross margin | Product cost only | Is the product priced well against its cost? |
| Contribution margin | All variable, per-order costs | Does each order make money, and how much can I spend to win it? |
| Net profit | Everything, including fixed costs | Does the business make money overall? |
Gross margin flatters. Net profit is too far downstream to steer by week to week. Contribution margin sits in between, close enough to each order to act on and complete enough to trust.
How do you raise contribution margin?
There are only a handful of levers, and they're worth knowing as a set. Every one either raises revenue per order or lowers a variable cost.
- Price. The strongest lever, because nearly all of it flows to contribution. Covered in the pricing post above.
- Average order value. A larger order spreads fixed per-order costs, like pick and pack and the base shipping charge, across more revenue. A second unit in the same box usually costs far less to ship than a second order.
- Discount discipline. Fewer, more targeted promotions. Retire the codes that became permanent.
- Shipping and fulfilment. Packaging, carrier rates and free-shipping rules are all negotiable or adjustable.
- Returns. Clearer product information, sizing and expectations reduce returns, and every avoided return is contribution kept.
- Product cost. Supplier terms and freight. Important, but usually the slowest lever to move.
From an operator's view, the order to check them in is: discounts first (fastest to change), then price and order value (largest effect), then fulfilment and returns, then product cost.
How does contribution margin connect to lifetime value?
A first order only tells part of the story. Returning customers don't cost acquisition spend again, so their orders usually carry more contribution than the first one did.
That's why lifetime value should be measured on contribution, not revenue. A customer with three orders at $26 contribution each is worth $78 before acquisition. The same customer measured on revenue looks like $180, which can justify spending far more to acquire them than you should. We cover this properly in customer lifetime value in ecommerce.
For the bigger picture of how contribution, acquisition cost and payback fit together, read ecommerce unit economics. It answers the question this post sets up: can the store afford to grow?
What mistakes do stores make with contribution margin?
These are the ones we check first.
- Leaving out discounts. Shopify shows gross sales and discounts separately, and it's easy to calculate margin on the pre-discount price. Use what the customer actually paid.
- Forgetting payment fees. Small per order, large across a year.
- Using one blended shipping figure for every product. A heavy, bulky product and a light one can have very different contribution, even at the same price.
- Ignoring returns. A returned order costs shipping twice and may not be resellable. Build an allowance in.
- Calculating it once. Costs drift. Recalculate monthly, at least for your best sellers.
Where contribution margin sits among your KPIs
Contribution margin is the foundation of every other economic KPI. Acquisition cost only means something next to it. Payback is measured in it. Lifetime value should be built from it. Our guide to ecommerce KPIs shows how it connects to revenue per visitor, payback and repeat purchase rate.
No single margin target fits every store. A high-price, low-reorder product and a low-price consumable can both run healthy businesses on very different contribution percentages. What matters is whether the dollar contribution per order covers what you pay to win and keep the customer.
A practical next step: build the table above for your three best-selling products using your own costs. If order value turns out to be the weakest line, our AOV Gameplan lays out how to raise average order value without giving the margin back in discounts.
