Revenue can grow every month, and a store can still be quietly losing money on every order. That gap between “sales are up” and “cash in the bank is down” is usually explained by one number founders don’t look at closely enough: contribution margin. It’s one of the first metrics we rebuild when we take over the books for a new e-commerce client, because it’s usually the fastest way to find out why a “profitable” P&L doesn’t match what’s actually happening in the bank account.
If you’ve only ever tracked gross margin or watched top-line revenue and called it a day, this is the metric that tells you which orders, products, and channels are actually worth running. Here’s how to calculate it correctly, which ecommerce costs are genuinely variable versus fixed, and how to use the number for pricing and ad spend decisions instead of just reporting on it after the fact.
What Contribution Margin Actually Means
Contribution margin is what’s left from a sale after you subtract the costs that move directly with that order. Not rent, not salaries, not your Shopify subscription. Just the costs tied to producing, fulfilling, and selling that specific unit.
Contribution Margin = Net Revenue − Variable Costs
“Net revenue” here means revenue after discounts and refunds, before any variable costs are subtracted, not your Shopify dashboard’s gross sales figure. That distinction matters more than it sounds like it should, because inflated top-line revenue is exactly what makes a store look healthier than it is.
Whatever is left over contributes toward covering fixed costs and, once those are covered, becomes actual profit. Because it’s calculated per order, per unit, or per SKU, it’s a far more useful day-to-day decision-making tool than a blended, company-wide margin figure that only gets reviewed once a month.
Contribution Margin vs Gross Margin
This is the single most common point of confusion, so it’s worth separating cleanly.
Gross margin = Revenue minus COGS (product cost, and usually inbound freight). Nothing else.
Contribution margin = Revenue minus every variable cost associated with the sale, which includes COGS but also extends to shipping, payment processing, fulfillment, and, in most DTC reporting, the marketing cost attributed to acquiring that order.
Two stores can post identical gross margins and have completely different contribution margins, because one is spending heavily on paid acquisition and the other is growing mostly through organic and email. Gross margin won’t surface that difference. Contribution margin will.
Think of it this way: gross margin tells you whether the product itself is priced correctly. Contribution margin tells you whether the business model holds up once you account for what it actually costs to acquire, fulfill, and service that order.
Variable, Fixed, and the Semi-Variable Costs That Trip People Up
Most DIY calculations go wrong in one of two directions: people only subtract COGS, which just reproduces gross margin with extra steps, or they subtract costs that don’t actually scale with volume, which understates the real number.
Genuinely variable costs in an ecommerce order typically include:
- COGS — manufactured or wholesale cost of the product
- Packaging — boxes, inserts, branded materials shipped with the order
- Payment processing fees — the percentage-based component from Shopify Payments, Stripe, or a card network
- Per-unit fulfillment cost — the pick, pack, and ship fee your 3PL or Amazon FBA charges per order
A few costs are semi-variable, meaning part of the cost is fixed and part scales with volume, and treating them as purely one or the other will distort your number:
- Shipping and fulfillment contracts often include a fixed monthly minimum or storage fee on top of the per-unit charge. Only the per-unit portion belongs in a strict variable cost calculation; the minimum is a fixed cost regardless of how you allocate it internally.
- Payment processing usually has a small fixed fee per transaction (like $0.30) stacked on top of the percentage. It behaves like a variable cost in aggregate because it scales with order count, but it isn’t purely proportional to order value.
- Paid advertising spend is the one people misclassify most often. In the strict managerial accounting sense, ad spend is not a true variable cost, it doesn’t move automatically with each unit sold the way COGS does. A brand running a fixed monthly ad budget is spending a fixed amount regardless of conversion volume. That said, most e-commerce finance teams still allocate ad spend into contribution margin at the order or channel level, because it’s the only way to answer “Was this customer worth acquiring.” Just be clear internally that you’re using an attributed marketing cost, not a textbook variable cost, and don’t rely on it in isolation at low order volumes, where a handful of conversions can swing the per-order allocation wildly.
What stays fixed no matter what: warehouse lease, salaried payroll, software subscriptions, insurance, and general overhead. If a cost doesn’t change when your sales volume changes, it’s fixed, full stop.
Returns and chargebacks deserve separate treatment rather than a single line item. A refund typically costs you the product (if not resalable), return shipping, and restocking labor. A chargeback costs you the chargeback fee on top of the lost merchandise, with no product recovery at all, since the customer usually keeps the item. For forecasting and pricing, it’s reasonable to model these as a proportional allocation based on your historical return and chargeback rate. But your actual, recorded contribution margin for a given period should reflect the returns and chargebacks that were genuinely incurred that period, not a smoothed estimate. Mixing the two approaches is a common way this metric quietly drifts from reality.
Worked Example
Say you sell a skincare product at $40 per unit, with a 3% historical return rate.
| Cost component | Amount |
| COGS | $9.00 |
| Packaging | $1.50 |
| Fulfillment (per-unit portion) | $6.00 |
| Payment processing (2.9% + $0.30) | $1.46 |
| Attributed ad spend | $12.00 |
| Allocated return/chargeback cost (3% rate) | $0.50 |
| Total variable cost | $30.46 |
Contribution Margin per unit = $40.00 − $30.46 = $9.54
Contribution Margin Ratio = $9.54 ÷ $40.00 = 23.9%
Now apply that to break-even. If this product’s share of monthly fixed costs, rent, salaries, software, and other overhead works out to $18,500, you’d need:
Break-Even Units = Total Fixed Costs ÷ Contribution Margin Per Unit: $18,500 ÷ $9.54 ≈ 1,940 units per month
That’s a concrete, trackable target instead of a vague “we need more sales.” It also tells you immediately what a $2 increase in per-unit ad spend would do to that number, which is the kind of question a blended monthly margin figure can’t answer quickly.
CM1, CM2, CM3: A Useful Convention, Not a Universal Standard
There’s no single industry-wide definition of these tiers, so if you see them used differently elsewhere, that’s not necessarily wrong, it’s a different convention. One version commonly used in e-commerce finance:
- CM1: Revenue minus COGS, packaging, payment processing, and per-unit fulfillment. This isolates product and operational efficiency before any marketing cost enters the picture.
- CM2: CM1 minus attributed marketing spend. This is the number that actually tells you whether a channel or campaign is profitable, with the caveats on ad spend allocation above.
- CM3: CM2 minus other variable selling costs, returns, chargebacks, and affiliate or marketplace commissions. This is the closest approximation to the true bottom-line contribution before fixed overhead.
Whichever convention you use, the point is consistency: define what belongs in each tier once, document it, and apply it the same way every month so the numbers stay comparable.
What “Good” Actually Depends On
Published benchmark ranges for contribution margin by category circulate widely, but most aren’t sourced from audited data and vary enormously depending on what a given source counts as a variable cost. Treat any external benchmark as a rough sanity check, not a target.
A more reliable approach is building your own baseline: calculate CM1 through CM3 for your current SKU lineup, then track the trend over time. If CM2 is shrinking quarter over quarter while revenue grows, that’s a signal worth investigating regardless of what a published industry average says. If you’re actively scaling paid acquisition, most operators want to see a comfortably positive CM2 on new campaigns before increasing budget, since a campaign that’s marginal at low spend rarely improves as you scale it.
Using Contribution Margin to Make Actual Decisions
Pricing. If the contribution margin on a product is thin, the levers are the same three every time: raise the price, reduce a specific variable cost (better freight rate, lighter packaging), or accept that the SKU exists to drive traffic or cart size rather than profit, and manage it deliberately instead of by accident.
Ad spend decisions. When CM2 on a campaign turns negative, that’s worth acting on regardless of how strong the ROAS looks. ROAS measures ad efficiency relative to spend. Contribution margin measures whether the order was profitable once every real cost is accounted for, and the two frequently disagree, especially on new customer acquisition campaigns.
SKU rationalization. Run this at the SKU level, not just the store level. It’s common to find that a few hero products are subsidizing several underperforming ones that never get questioned because total revenue looks healthy.
Common Mistakes to Avoid
- Treating paid ad spend as a true variable cost without the caveat that it’s an attributed cost, then over-trusting per-order allocations at low volume
- Recording contribution margin only at the store level instead of by SKU or channel, which hides exactly the problems this metric exists to find
- Ignoring the fixed portion of semi-variable costs, like 3PL storage minimums, which quietly understates true variable cost
- Using a smoothed return/chargeback allocation for actuals reporting instead of recording what was genuinely incurred that period




