What Is Contribution Margin in Ecommerce (And Why It Matters More Than Revenue)
by Trivas.ai
|
8 min read
Oct 06, 2026
What Contribution Margin Actually Means
Here's a question most ecommerce dashboards can't answer cleanly: is this specific order, SKU, or campaign actually making you money? Revenue won't tell you. Neither will ROAS. That's what contribution margin is for.
Contribution margin is revenue minus variable costs, the costs that move with each sale: cost of goods sold, payment processing fees, shipping, and the ad spend you can attribute to that order. It excludes fixed costs like rent, salaries, and software subscriptions.
The name comes from what's left over. Once you subtract variable costs from revenue, whatever remains "contributes" toward covering fixed costs, and eventually, profit. If that number is negative, you're not just failing to profit on that order, you're actively losing money, no matter how good it looks on a P&L summary.
This is also where most brands get sloppy. Contribution margin isn't a company-wide number. It needs to be calculated per order, per SKU, or per channel. A business-wide average hides the fact that some products are propping up others that lose money every time they ship.
That's the core tension worth sitting with: a brand can post $2M in revenue this quarter and still be unprofitable, if contribution margin across its best-selling SKUs is negative. Revenue growth and profitability aren't the same thing, and contribution margin is the number that separates them.
The Contribution Margin Formula
The basic formula:
Contribution Margin = Revenue - Variable Costs
To express it as a percentage, you'd use the contribution margin ratio:
Contribution Margin Ratio = (Revenue - Variable Costs) / Revenue x 100
The hard part isn't the math. It's knowing what actually counts as a variable cost in ecommerce. Here's what belongs in that bucket:
Cost of goods sold (COGS)
Payment processing fees (typically around 2.9% + $0.30 per transaction)
Pick, pack, and shipping costs
Marketplace referral fees (Amazon takes a cut on every sale, for instance)
Paid ad spend allocated to that specific order or SKU
What doesn't belong: salaries, software subscriptions, your warehouse lease, insurance, and other fixed overhead that doesn't change based on how many units you sell this week. Mixing these in is one of the fastest ways to miscalculate contribution margin, and it's a mistake we'll come back to later.
Contribution Margin vs Gross Margin vs Net Margin
These three get confused constantly, and the differences matter.
Gross margin only subtracts COGS from revenue. It ignores shipping, payment processing, and ad spend entirely, so a product can look like it has a healthy 60% gross margin while actually losing money once you factor in what it costs to acquire and ship each order.
Net margin goes the other direction. It subtracts everything, including fixed costs, giving you a single company-wide profitability number. Useful for investors and annual planning. Useless for deciding whether to scale a specific ad campaign or discontinue a SKU.
Contribution margin sits in the middle. It's more complete than gross margin because it captures the real variable costs tied to fulfillment and acquisition. It's more granular than net margin because you can calculate it per order, per SKU, or per channel.
[@portabletext/react] Unknown block type "table", specify a component for it in the `components.types` prop
This is why ecommerce brands specifically need contribution margin as a working metric, not just an accounting footnote. You're not running one product. You're running dozens of SKUs across multiple channels, each with its own acquisition cost and shipping profile. Contribution margin is the only one of these three that lets you evaluate them individually.
Worked Example: Calculating Contribution Margin for a Single Order
Let's make this concrete. Say you sell a $50 product, and the order breaks down like this:
That's a decent number. The order is profitable after every variable cost is accounted for, and there's $10.25 left to put toward rent, salaries, and software.
Now change one variable. Say that same SKU, same price, same shipping cost, is running through a campaign where CAC has crept up and allocated ad spend is now $25 instead of $12.
$50 - $20 - $1.75 - $6 - $25 = -$2.75
Same product. Same price. Negative contribution margin.
This is exactly the swing that a ROAS calculator won't catch on its own, because ROAS only looks at ad spend against ad-attributed revenue. It doesn't know about your shipping costs or processing fees. Contribution margin is what tells you whether scaling that ad campaign is actually making you money, or just moving more units at a loss.
Why Contribution Margin Matters More Than Revenue or ROAS
A campaign can hit its ROAS target and still be a money loser. If your target ROAS is 3x and you're generating $150 in revenue for every $50 in ad spend, that looks great on a dashboard. But if shipping, processing, and COGS eat $110 of that $150, you're left with $40 to split across ad spend of $50. You already lost money, and ROAS never told you.
This is the case for making contribution margin the gate for scaling decisions, not top-line revenue growth. Revenue tells you volume. Contribution margin tells you whether that volume is worth having.
Picture two SKUs with identical revenue this month, say $40,000 each. SKU A has a 25% contribution margin. SKU B has a 4% contribution margin because its ad spend has crept up and its shipping costs are higher (bulkier product, more packaging). Same revenue, wildly different economics. SKU A deserves more ad budget. SKU B needs a pricing review, a shipping cost audit, or a CAC ceiling before another dollar goes toward promoting it.
Contribution margin also ties directly into break-even analysis. If your fixed costs (warehouse lease, salaries, software) total $80,000 a month, you need enough combined contribution margin dollars across all your SKUs to clear that number before you're actually profitable. Revenue alone won't tell you how close you are. Contribution margin dollars will.
Common Mistakes When Calculating Contribution Margin
A few mistakes show up constantly when brands start tracking this:
Lumping in fixed costs. Including software subscriptions, salaries, or rent in the variable cost bucket understates contribution margin and defeats the point of calculating it separately from net margin in the first place.
Ignoring payment processing fees. They feel small, 2.9% here, 30 cents there, but across thousands of orders a month, they add up to a real chunk of margin that gets overlooked constantly.
Not allocating ad spend down to the SKU or campaign level. If you're only looking at blended ad spend across the whole account, every product ends up looking equally profitable, which is almost never true. Some SKUs carry the acquisition cost for others.
Calculating it once a quarter. CAC moves weekly. Shipping carrier rates change. Ad platform costs fluctuate with competition and seasonality. A contribution margin number from three months ago tells you almost nothing about whether this week's campaigns are profitable.
Tracking Contribution Margin Without the Manual Spreadsheet Work
The manual version of this looks familiar to most operators: pull COGS from your inventory system, export ad spend from Meta, Google, and Amazon separately, grab shipping costs from your fulfillment tool, and stitch it all together in a spreadsheet. By the time it's done, the numbers are already a week old.
Trivas pulls Shopify, Amazon, and ad platform data into one Redshift-backed dashboard, so contribution margin updates automatically at the SKU and campaign level instead of living in a spreadsheet someone has to rebuild every Monday. You see margin by product, by channel, by campaign, without reconciling four exports by hand.
The AI Wingman layer sits on top of that and flags it when a SKU's contribution margin drops below a threshold you set, rather than waiting for someone to notice during a monthly review. If CAC creeps up on a campaign and turns a profitable SKU into a losing one, you find out that week, not next quarter.
Start Tracking Contribution Margin by SKU and Campaign
Revenue and ROAS both have blind spots. Contribution margin doesn't, as long as you're tracking it at the right level of granularity and actually including every variable cost that touches an order.
If you're running ecommerce finance or growth, this is the number that should gate your scaling decisions, not the top-line revenue chart your board sees once a month.
Worth exploring: automated BI reporting built to track contribution margin by SKU and campaign without the manual export work, and the data dictionary if you want exact definitions for every margin and acquisition metric used across ecommerce analytics.
Content author and contributor at Trivas.ai, sharing insights on e-commerce analytics, business intelligence, and data-driven strategies to help businesses grow.
Continue Reading
explore more insights
Does Northbeam Work for Small Shopify Brands? The Honest Answer
3 min read
Product Performance Analysis
3 min read
Shopify Analytics for European DTC Brands: The BOFU Buyer's Guide