Contribution Margin for Ecommerce: Formula and Examples
Your profit and loss says you made money. Your bank says you didn't. Contribution margin after ads, CM3, is the number that explains the gap, and here's the formula with a real product and a worked example.

Your accountant says you made money last month. Your bank account disagrees.
Here's the contribution margin ecommerce brands actually run on. Take an order's revenue and subtract every cost that only exists because that order happened: landed product cost, outbound shipping, payment and platform fees, a returns allowance, and the ad spend it took to win the sale. What's left is contribution margin. It's the money each order contributes toward rent, salaries, software, and you.
Gross margin stops at the product cost. Contribution margin keeps cutting until it hits the ad bill. That last cut, after ads, tells you whether growing the store next month puts cash in the account or pulls it out.
Most founders have never seen that number for their own store. Revenue, gross margin and return on ad spend can't tell you if yesterday made money.
A store can be profitable on paper every month of the year and still not be able to pay for its own inventory. Contribution margin after ads is where that story gets written.
What is contribution margin in ecommerce?
Contribution margin is revenue minus variable costs. In a Shopify store, "variable" is where the fights start, so here's the list I use, in order:
- Landed product cost (factory price plus freight, duties and brokerage).
- Outbound shipping and fulfillment, including the part you subsidize with "free shipping."
- Payment processing and platform fees.
- A returns allowance (labels, inspection, units that can't be resold).
- Paid ad spend.
Everything that stays the same whether you ship 500 orders or 5,000 (your 3PL minimum, Klaviyo, salaries) is fixed and stays out. Polar Analytics' breakdown of the formula draws the same line: if the cost scales with volume, it's in.
One place this bites Shopify founders. Shopify's own profit report calculates gross profit by subtracting cost from net sales, and only for products with a cost per item recorded when they sold. That's the top line of the math, and shipping, fees, returns and ads still have to come off.
What are CM1, CM2 and CM3, and which one should you watch?
Each layer of the stack answers a different question.
| Layer | What comes off | The question it answers |
|---|---|---|
| CM1 | Revenue minus landed product cost | Does the price cover the product? |
| CM2 | CM1 minus shipping, fulfillment, payment fees, returns | Can you afford to deliver it? |
| CM3 | CM2 minus paid ad spend | Can you afford to advertise it? |
Some teams add a CM4 for marketplace fees or affiliate payouts. Don't fight about naming. Fight about the ad line.
CM1 is almost always flattering. Polar Analytics' benchmark table has apparel brands at high 60s to 70s percent on CM1 and low to mid teens on CM3. Home goods go from high 50s on CM1 to low single digits on CM3. Shipping weight and the ad auction ate the difference.
And the trend is the wrong direction. Finaloop's review of Q1 2025 numbers across hundreds of DTC brands found gross margins rising to 59% while contribution margin dropped from 32% to 25%, with rising customer acquisition cost named as the reason. Brands improved the top of the stack and still lost 7 points at the bottom.
So the answer to "which one should I watch" is CM3. Watch CM1 and CM2 to diagnose. Watch CM3 to decide.
Gross margin tells you the product works. CM3 tells you the business works. They're not the same sentence.
Why can a store be profitable on paper and short on cash?
Run the math on a store like this, a hypothetical. A dog bed brand on Shopify, one month, 1,200 orders at a $74 average order value: $88,800 in revenue. Landed cost $21 an order. Shipping you pay $7.40 an order. Payment fees, call it 3% flat. Returns allowance $1.60 an order. Ad spend $38,500. Fixed costs (3PL minimum, apps, a part-time ops hire) $9,900.
| Line | Per month | Per order | % of revenue |
|---|---|---|---|
| Revenue | $88,800 | $74.00 | 100% |
| Landed product cost | $25,200 | $21.00 | |
| CM1 | $63,600 | $53.00 | 71.6% |
| Shipping | $8,880 | $7.40 | |
| Payment fees (3%) | $2,664 | $2.22 | |
| Returns allowance | $1,920 | $1.60 | |
| CM2 | $50,136 | $41.78 | 56.5% |
| Ad spend | $38,500 | ||
| CM3 | $11,636 | 13.1% | |
| Fixed costs | $9,900 | ||
| Operating profit | $1,736 | 2.0% |
Profitable. Barely, but profitable. The accountant is right.
Now split the 1,200 orders the way the ad platform sees them. 800 came from new customers, who are the only reason the $38,500 was spent. 400 came from repeat buyers off email, at zero ad cost.
| New customers (800 orders) | Repeat buyers (400 orders) | |
|---|---|---|
| CM2 (at $41.78 an order) | $33,424 | $16,712 |
| Ad spend | $38,500 | $0 |
| CM3 | -$5,076 | $16,712 |
| CM3 per order | -$6.35 | $41.78 |
Every new customer costs $48.13 in ads ($38,500 over 800) and leaves $41.78 after product, shipping, fees and returns. First order: a $6.35 loss. The "growth" the ad account is so proud of is a $5,076 hole that the loyal 400 fill in.
Then the cash part. That same month, the brand paid a $30,000 inventory reorder for Q4. The profit and loss shows plus $1,736. The bank shows minus $28,264. Two true statements about the same month.
That's the whole paper-versus-bank problem. The P&L blends orders that cost nothing to get with orders that cost more than they return, then calls the average "profit." Scale the ads and the average gets worse, because you're adding more of the losing kind. If the inventory timing is the half of this that's keeping you up, the Q4 cash flow guide walks through the gap month by month.
I'll say the quiet part. I think gross margin is the most dangerous number on a Shopify dashboard. Everybody quotes it, it looks best, and it can't see the ad bill.
Buying revenue and banking it feel identical on the sales report. They only separate on the CM3 line.
What does contribution margin look like on a real product?
Here's a real one, so you can see the stack with no rounding. One of our clients sells a pest-control product, the Smart Rodent, that lived on Amazon at $29.95. Per sale on Amazon: landed cost $7.50, shipping $4.24, Amazon's 15% platform fee $4.49, advertising $5.99. The full breakdown is on our results page. Real client numbers, not typical results, and not a promise of what your store will do.
Walk it down the stack:
CM1 after $7.50 landed cost. CM2 after $4.24 shipping and $4.49 platform fee. CM3 after $5.99 advertising.
$29.95 of revenue became $7.73 of net profit per sale. CM1 was 75%. CM3 was 26%. Amazon's referral fee plus shipping took more than the ads did.
Then the same product moved to its own Shopify store with a rebuilt page at $49.95. Per unit, landed cost stayed at $7.50, shipping went to $6.30, platform fees dropped to 3% ($1.50), and gross profit per unit went from $13.72 to $34.65. The page sold more than one unit per order, so average order value became $177.75, advertising rose to $63.40 per order, and net profit per sale landed at $78.87, after paying for ads and inventory.
Read that ad line again. Ad cost per sale went up more than 10x, from $5.99 to $63.40. Net profit per sale went up about 10x too, from $7.73 to $78.87. What changed is how much contribution each order could carry into the ad auction.
On Amazon? Start with the fee math for your own listings, because the 15% referral fee sits inside CM2 before you've spent a dollar on ads.
How do you lift CM3 without cutting the ad budget?
Back to the hypothetical dog bed brand.
Cutting ads lifts CM3 for one month, then revenue falls and the fixed costs don't. Negotiating landed cost helps CM1 by a dollar or two. The lever that moves CM3 by thousands is the page the ads land on, because it decides two numbers at once: how many paid visitors buy, and how big the order is.
Here's the math. The $38,500 bought 40,000 sessions. 800 new orders is a 2.0% conversion rate at a $74 average order value, so revenue per visitor was $1.48. Ad cost per new customer: $48.13.
Now watch what happens if the rebuilt page converts at 3.0% and the order grows to $82 because the page finally sells the matching blanket with the bed. 1,200 new orders from the same 40,000 sessions, revenue per visitor $2.46. Landed cost per order rises to $23.50 for the extra item. Per order: $82 minus $23.50 landed, $7.40 shipping, $2.46 fees, $1.60 returns leaves $47.04 of CM2. Times 1,200 orders is $56,448. Minus the same $38,500 in ads: new-customer CM3 of $17,948, against negative $5,076 before.
| Before | After | |
|---|---|---|
| Sessions from ads | 40,000 | 40,000 |
| Conversion rate | 2.0% | 3.0% |
| Average order value | $74 | $82 |
| New-customer orders | 800 | 1,200 |
| Ad cost per new customer | $48.13 | $32.08 |
| CM2 per order | $41.78 | $47.04 |
| New-customer CM3 | -$5,076 | $17,948 |
Same ad spend. Same traffic. Growth went from a hole to a $17,948 contribution, and every extra ad dollar now buys customers who pay for themselves on the first order. Now you can scale Facebook ads.
Two things make this easier than it was two years ago. Pulling the numbers: Shopify's Sidekick can now turn a plain question into an analytics report, so "orders by new versus returning customers for September" is a sentence, not a report-builder session. Ad spend still lives in Meta and Google, so the join is yours. Fixing the page: AI can now draft the headline, the objection-handling copy, the bundle offer and the images around the questions a buyer asks before paying $82 for a dog bed, in minutes instead of a month of agency back-and-forth. That's the part that moves conversion rate and order value at the same time.
One nuance. A negative first-order CM3 can be a deliberate choice if you know your repeat rate and payback window. A subscription coffee brand that loses $6 on order one and sees 60% of buyers reorder within 45 days is fine. A dog bed brand with a 14% repeat rate is not. Venon's break-even math shows why one universal ad target across every order hides that difference.
For how CM3 feeds payback, marketing efficiency and the weekly dashboard, the ecommerce profit analytics guide is the long version. To run the stack product by product, go to profit per product on Shopify, where a hypothetical store's top revenue product drops to last once ads come off.
Cutting ads fixes CM3 for a month. Fixing the page fixes it for every month after.
What to do next
This week, build the stack for last month. Revenue, CM1, CM2, CM3, as dollars and as a percent. Then do the one split that matters: new-customer orders with the full ad bill on them, repeat orders with none. If new-customer CM3 is negative, you've found why the P&L and the bank disagree, and you've found the page that has to work harder before the next budget increase.
Planning a sale on top of that? Run it through the Black Friday profit margin breakdown first, because a discount comes straight out of CM2 and a negative CM3 gets deeper at volume. If your landed cost hasn't been rebuilt since tariffs moved, the landed cost worksheet is the CM1 line done properly. And for what the leak looks like from the founder's chair, read the $60K store that was actually losing money.
Book Your Profit Audit
If your CM3 on new customers is negative, the ad budget is renting revenue and the page is the landlord. On a free profit audit we rebuild the stack for your store, find exactly where each order loses contribution, and show you how to rebuild a high-converting product sales page in less than 15 minutes.
Or go here to check it out → revenueflows.ai
P.S. Paper profit is the average of orders that cost nothing and orders that cost too much. Cash is what's left when you stop averaging.
Frequently asked questions
What is contribution margin in ecommerce?
Contribution margin is what an order leaves you after every cost that grows with that order: landed product cost, shipping, payment and platform fees, returns, and the ad spend it took to win it. It's the money that contributes to paying your fixed costs. A $74 order that costs $21 to land, $11.60 to ship and process, and $48 in ads to win has a contribution margin of negative $6.60.
How do you calculate contribution margin for an ecommerce store?
Start with net revenue after discounts and refunds. Subtract landed cost of goods, outbound shipping, payment and platform fees, a returns allowance, and paid ad spend. What's left is contribution margin in dollars. Divide by net revenue for the percentage. Do it per order and per month, and split new-customer orders from repeat orders, because the ad spend sits on the new ones.
What is the difference between CM1, CM2 and CM3?
CM1 is revenue minus landed product cost, which tells you whether the price covers the product. CM2 is CM1 minus shipping, fulfillment, payment fees and returns, which tells you whether you can afford to deliver it. CM3 is CM2 minus ad spend, which tells you whether you can afford to advertise it. CM3 is the one that decides whether growth creates cash.
What is a good contribution margin for a DTC brand?
There's no single number, but the published benchmarks cluster. Eightx's summary of the Triple Whale 2025 benchmarks puts the median DTC brand at 60% to 70% gross margin and 15% to 20% contribution margin after ads, with top-quartile brands at 28% or more. Polar Analytics shows CM3 in the low to mid teens for apparel and single digits for home goods. If your CM3 on new customers is negative, you're buying revenue, not banking it.
Why is my store profitable on paper but I never have cash?
Usually because your profit and loss blends repeat orders, which carry no ad cost, with new-customer orders, which carry all of it, and because inventory is paid in cash months before it's sold. A store can post a small operating profit while every new customer loses money on their first order and a $30,000 reorder leaves the account the same month. Split CM3 by new versus returning and the leak shows up in one line.
Is contribution margin the same as gross margin?
No. Gross margin only subtracts the cost of the product, which is what Shopify's profit report shows. Contribution margin keeps going: shipping, fees, returns and ad spend all come off. Two products can share a 70% gross margin and land at a 25% and a negative 5% contribution margin once shipping weight and ad cost are counted.

