How to calculate contribution margin for ecommerce
Contribution margin is the number that tells you if a product actually works — not gross margin, not net profit. Here's the exact formula, step by step.
Contribution margin is the single most useful profitability number for an ecommerce seller — more useful than gross margin, and more immediately actionable than net profit. Here's exactly how to calculate it, step by step, with real numbers.
The definition
Contribution margin = Contribution profit ÷ Net revenue. Contribution profit is net revenue minus every variable cost — product cost, packaging, shipping, COD and payment fees, marketplace commission, and ad spend — but not fixed overhead like rent, salaries, or software subscriptions. It answers one specific question: is this product or channel working, on its own merits, independent of your fixed cost base?
That's different from gross margin (selling price minus product cost only — ignores shipping, fees, and funnel drag) and different from net/operating profit (which also subtracts fixed overhead, and so conflates "is this product working" with "is the whole business working").
Step 1 — build the real funnel first
Before any revenue is counted, work out how many of your orders placed actually turn into revenue. Orders cancel, some ship out and come back as RTO, and some get delivered and then returned. Only the units that survive all three — realized units — generate revenue, commission, and GST.
Step 2 — calculate net revenue, not gross revenue
Net revenue is realized units × selling price, net of any discount and net of GST — GST collected is money you owe the government, not revenue you keep, so it has to come out before margin math, not after.
Step 3 — attribute costs to the stage where they're actually incurred
This is the step most calculators get wrong. Not every cost applies to every order:
- Product cost: only on realized units — unsold stock that comes back isn't consumed.
- Packaging and forward shipping: on every dispatched order, win or lose.
- Reverse shipping and a damage/resale-loss provision: on RTO + returned units.
- Marketplace commission: only on realized units — marketplaces reverse it on RTO/returns.
- Ad spend: a monthly total, independent of the per-unit funnel.
A full worked example
₹4,10,705 in net revenue, minus ₹2,38,440 in total variable cost, leaves ₹1,72,265 in contribution profit — a 41.9% contribution margin. This seller's fixed monthly opex of ₹25,000 comes out after this number, producing an operating profit of ₹1,47,265 — a separate question from whether the product itself is working.
What to do with this
- Calculate contribution margin per product, not just at the business level.
- Use it to decide where to spend ad budget — a higher-margin product can absorb a higher CAC and still be profitable.
- Don't fold GST into the cost side — it's collected on behalf of the government, not spent.