Ecommerce Finance · Sourced · 2026
Contribution Margin for Ecommerce: The Honest Scoreboard That Connects More Orders to More Money
Contribution margin is revenue minus variable costs. The formula, worked examples, the discount trap, and how to judge CRO tests on contribution per visitor.
What is contribution margin?
Contribution margin is the money left from a sale after you subtract the variable costs of that sale. It is what each sale "contributes" toward covering your fixed costs, and once those are paid, toward profit. Put as a sentence you can keep in your head: contribution margin is revenue minus variable costs.
Variable costs are the costs that move when an order moves: the product itself, the card-processing fee, the shipping you absorb, the per-order fulfillment cost. Fixed costs (your rent, your salaries, your Shopify subscription) do not change when you sell one more unit, so they stay out of the calculation entirely.
That last point is the single most important thing in this whole guide, so hold onto it: contribution margin subtracts variable costs only. It never subtracts fixed costs. This is the line that separates contribution margin from gross margin and from operating or net profit, and it is the line a finance-literate reader will check first. The framing matches managerial accounting: "contribution" is the portion of sales revenue not consumed by variable costs, so it is available to cover fixed costs (Wikipedia, Contribution margin; Harvard Business Review).
Why ecommerce founders should care more than most: in a Shopify store, a big share of the costs that decide whether a sale made money are not in your cost-of-goods spreadsheet. Payment fees, the shipping you eat on a "free shipping" order, the 3PL pick-and-pack fee, the cost of a return. Each one is variable, each one scales with orders, and each one belongs inside contribution margin. Leave them out and your margin looks healthier than it is. That gap is exactly where the "my AOV is up, why is my bank balance flat" problem lives, and it is what the rest of this guide is built to close.
The contribution margin formula (total, per unit, and the equation behind it)
There are three forms of the formula. They are the same idea measured at different scopes, and together they answer "contribution margin formula", "contribution margin equation", and "contribution margin per unit".
Total contribution margin looks at your whole business or a whole product line:
- Contribution margin = Total revenue − Total variable costs
Contribution margin per unit looks at one order or one product. This is the version you will use most, because it answers "does selling one more of these make money?":
- CM per unit = Selling price per unit − Variable cost per unit
In accounting shorthand this is written C = P − V, where P is the price and V is the variable cost per unit. That is the unit contribution margin, sometimes called the dollar contribution per unit.
Contribution margin ratio turns the dollars into a percentage of revenue (covered in full in its own section below):
- CM ratio = Contribution margin ÷ Revenue = (Price − Variable cost) ÷ Price
The reason all of this matters beyond bookkeeping is what it connects to. Contribution margin is the engine of breakeven and cost-volume-profit analysis, because once you know the contribution per unit you can divide your fixed costs straight into it:
- Operating profit = (CM per unit × units sold) − total fixed costs
- Breakeven units = total fixed costs ÷ CM per unit
- Breakeven revenue = total fixed costs ÷ CM ratio
In other words, "is this sale profitable?" and "how many do I need to sell?" are the same question, and contribution margin is the number that answers both. That is why it is worth getting exactly right rather than approximately right.
How to calculate contribution margin: a worked Shopify example
Here is the calculation end to end on an order any Shopify merchant will recognize. A skincare store sells a serum for $50. Work the variable costs one line at a time, then subtract.
Step 1. Start with the selling price. Revenue on this order is $50.
Step 2. Subtract the product cost (COGS). The serum costs the store $15 landed (the unit cost plus inbound freight to get it into inventory).
Step 3. Subtract the payment processing fee. On Shopify Payments' Basic plan the US online card rate is 2.9% + 30¢ (Shopify Help Center, Shopify Payments fees). On a $50 order that is $1.45 + $0.30 = $1.75.
Step 4. Subtract the shipping and packaging you actually pay. The store offers free shipping and absorbs $6 per order in postage and the box.
Step 5. Subtract per-order app fees. A checkout upsell app charges $0.50 on this order.
Step 6. Add the variable costs and subtract from price. Variable cost per unit = 15 + 1.75 + 6 + 0.50 = $23.25.
- Contribution margin per unit = $50 − $23.25 = $26.75
- Contribution margin ratio = $26.75 ÷ $50 = 53.5%
Now compare that to the number most merchants quote. Gross margin subtracts COGS only: $50 − $15 = $35, a 70% gross margin ratio. So this store would happily tell you it runs "70% margins", when the honest contribution margin is 53.5%. The 16.5-point gap is the shipping, payment, and app costs that gross margin quietly ignores.
Why the gap matters in dollars: if this store carries $20,000 a month in fixed costs (its Shopify plan, salaries, rent, flat-fee apps), its breakeven is 20,000 ÷ 0.535 = $37,383 in monthly revenue, or 20,000 ÷ 26.75 = 748 units a month. Had you used the 70% gross-margin figure instead, you would have told yourself breakeven was about 571 units and budgeted accordingly. That is the kind of error that quietly drains a store. The same logic is why raising average order value on Shopify helps so directly (more price per order flows straight into contribution) and why CRO for Shopify compounds (more orders at the same contribution margin is close to pure profit, since the fixed costs are already paid).
Contribution margin ratio: what the percentage tells you
The contribution margin ratio is the contribution margin expressed as a share of revenue:
- Contribution margin ratio = Contribution margin ÷ Revenue
In the serum example, $26.75 of contribution on $50 of revenue is a 53.5% ratio. Read that as: 53.5 cents of every sales dollar survives the variable costs and is available to cover fixed costs and then become profit. The other 46.5 cents was spent making and delivering the order.
Keep two things straight, because mixing them up is one of the most common contribution-margin mistakes. The contribution margin (a dollar amount, e.g. $26.75) and the contribution margin ratio (a percentage, e.g. 53.5%) are different numbers that tell you different things. A $1,000 furniture item can have a low ratio but a large dollar contribution; a $5 add-on can have a high ratio but tiny dollars. When you say "my contribution margin is 53", say whether you mean dollars or percent.
The ratio earns its keep in two places. First, breakeven on revenue: breakeven revenue = fixed costs ÷ contribution margin ratio, so the 53.5% ratio is what turns $20,000 of fixed costs into the $37,383 revenue target. Second, comparing products on different price points: the ratio normalizes for price, so you can see that a $20 product at a 60% ratio is a better use of a marketing dollar than a $200 product at a 25% ratio, even though the big-ticket item brings in more revenue per order. For a CRO program, the ratio is also the cleanest way to ask "if I move a visitor from product A to product B, did the store get richer or poorer per dollar of sales?"
Contribution margin vs gross margin vs operating and net margin
These four margins are not interchangeable, and treating any two of them as the same number is how merchants talk themselves into bad decisions. The difference is simply which costs you subtract from revenue.
| Metric | What you subtract from revenue | What it answers |
|---|---|---|
| Gross margin | COGS only (cost of goods sold) | How profitable is the product itself, before selling and operating costs |
| Contribution margin | All variable costs: COGS plus payment fees, shipping you absorb, per-order fulfillment and app fees | How much each sale contributes to fixed costs and profit |
| Operating margin | COGS + all operating expenses, variable and fixed (rent, salaries, flat-fee apps, overhead) | Profitability of the core business |
| Net margin | Everything: COGS + all operating costs + interest + tax | The bottom line, profit per dollar of revenue |
The one-liners worth memorizing:
- Gross margin = Revenue − COGS. Product cost only. It does not remove card fees or shipping. ($50 − $15 = $35, a 70% ratio in our example.)
- Contribution margin = Revenue − all variable costs. It removes COGS plus the variable selling costs gross margin ignored, so for most online stores contribution margin is lower than gross margin. ($50 − $23.25 = $26.75, a 53.5% ratio.) This is the counterintuitive part people state backwards: because contribution margin subtracts more, it is the smaller, more honest figure.
- Operating margin = operating profit ÷ revenue, where operating profit also subtracts fixed costs. Lower than contribution margin, because it now eats rent and salaries too.
- Net margin = net income ÷ revenue. Subtracts everything, including interest and tax. The lowest of the four.
The clean ladder, in one line: Revenue minus COGS = gross profit; revenue minus all variable costs = contribution margin; minus fixed costs = operating profit; minus interest and tax = net profit.
One nuance for the careful reader, so you are not caught out. Gross margin and contribution margin are not just two stops on the same subtraction ladder. They slice costs along different lines. Gross margin is the accounting view: it splits costs into "product" (COGS) and "period" (operating expense). Contribution margin is the decision view: it splits costs into "variable" (moves with each order) and "fixed" (does not). Some fixed costs can sit inside COGS (factory overhead, salaried production staff), which is why the two numbers can diverge in either direction depending on the cost structure. For a typical asset-light Shopify store buying from a supplier or running through a 3PL, COGS is almost entirely variable, so the practical rule holds: contribution margin = gross margin minus your variable shipping, payment, and per-order costs. That is the version to teach yourself.
Calculate your own contribution margin
You do not have to do this on paper. Use the calculator below: enter your selling price, product cost, payment-fee rate, the shipping you absorb, and any per-order fees, and it returns your contribution margin in dollars and as a ratio, plus the breakeven volume that follows from it. Change one input (say, a 15% discount, or a $4 shipping subsidy instead of free shipping) and watch the contribution move, so you can pressure-test a promotion before you ship it rather than after.
Contribution margin calculator
Enter what one order really costs you. Everything updates as you type.
Estimates, not accounting advice. The payment fee is applied to the discounted price; COGS, shipping, and other costs stay the same. Fold returns and pick-pack into "other variable cost" for a truer number.
The discount row is the one to play with first. As the worked example in the next section shows, a modest discount can take a brutal bite out of contribution, and the calculator makes that visible in one number instead of an argument.
Why contribution margin is the honest scoreboard for ecommerce
Here is the StorePilot thesis in one sentence: more orders is not the same as more money, and contribution margin is the only number that bridges the two. A conversion test, a discount, an upsell: each one changes how many orders you get and what each order is worth, but neither of those is the same as how much money you keep. Optimize for contribution and your wins are real. Optimize for conversion rate or revenue alone and some of your "wins" quietly lose money. Three traps make the case.
Trap 1: average order value up, profit down. Lifting average order value is a real goal, but AOV read without contribution is a vanity number. The usual AOV levers (a free gift, a spend-threshold, a bundle) add variable cost or cut price at the same moment they raise the average. Run "free $15 gift on orders over $100" and a customer adds a low-margin $22 accessory to qualify: AOV jumps, but you have now eaten the gift's cost and the accessory's thin margin, and contribution per order can fall even as the dashboard headline rises. The only way to tell a good AOV play from a bad one is to compute the contribution, not the average.
Trap 2: the discount trap. A discount feels cheap because it "only" costs a few percent. It is not, because the discount comes straight out of contribution margin, not out of revenue. Let m be your contribution margin ratio before the discount and d the discount as a fraction of price; the extra order volume you need just to break even on total contribution is:
- Required uplift in orders = d ÷ (m − d)
At a 40% starting margin: a 10% discount needs +33% more orders to break even, a 15% discount needs +60%, and a 20% discount needs you to double your order count (+100%) just to make the same total contribution you made before. Anything less and the promo lost money even if revenue went up. The lower your margin, the more brutal it gets: at a 30% margin a 15% discount already needs +100%. This is the math behind StorePilot's discount-breakeven calculator, and it is exactly why the instinct to discount an abandoned cart back to life often backfires (see reducing cart abandonment on Shopify for the better recovery moves).
Trap 3: judging a test by conversion rate instead of contribution. Conversion rate counts orders. It says nothing about what an order is worth or what it costs to fulfill. A variant can lift conversion rate while lowering revenue per visitor (more, smaller orders), and revenue per visitor can rise while contribution per visitor falls (a free-shipping offer that adds variable cost to every order). So the right ranking of test metrics is contribution per visitor > revenue per visitor > conversion rate. Revenue per visitor beats conversion rate because a variant's revenue can fall even as its conversion rate climbs (VWO, interpreting an A/B test report); contribution per visitor beats revenue per visitor because it nets out the variable cost the offer added. Set that primary metric before the test starts so you cannot cherry-pick afterward, run it to high statistical confidence (most disciplined teams test to 95%+, per Convert.com's A/B testing statistics), wait for minimum traffic, and ground your expectations in real Shopify conversion rate benchmarks for 2026 while running the test correctly per the Shopify A/B testing guide.
And the reason all of this rolls up: contribution margin per order is your max-CAC ceiling. The most you can pay to acquire a customer and still profit on the first order is your contribution margin per order, not your revenue and not your gross margin, because every other variable cost has already been paid out of that order. From the example above, $26.75 of contribution means $26.75 is the breakeven you can spend to win the customer; spend less and order one is profitable on its own, spend more and you are betting on repeat purchases to bail you out (a fine bet, but it has to be a stated bet). This is why CRO and customer acquisition are the same conversation: every dollar a test adds to contribution per order raises what you can profitably pay to fill the top of the funnel by a dollar. For a margin of safety, many operators set max CAC at a fraction of contribution per order and let lifetime value justify the rest. The ceiling is still contribution per order, and you cannot know it without computing your variable costs correctly, which is the next section.
Where the variable costs hide in a Shopify store
An honest contribution margin lives or dies on finding every variable cost. On Shopify, several of them are not in the typical merchant's cost spreadsheet. Here is where to look, with the figures sourced so you can sanity-check your own.
1. COGS (the landed product cost). The manufacturing or wholesale unit cost plus inbound freight and any duties to get the product into your inventory. This is usually the largest single variable cost and the driver of gross margin. For context, public margin data (NYU Stern / Damodaran, margins by sector) puts general retail gross margins around 33% and special-lines retail around 35%, implying COGS of roughly 65-67% of revenue for those sectors; many online stores run higher gross margins (often 40-60%) depending on category. Treat the widely repeated "41% ecommerce average" with caution: it is a secondary aggregation, not a primary figure.
2. Payment processing fees. A true variable cost: a percent of the sale plus a fixed cents charge. Shopify Payments' US online card rates run 2.9% + 30¢ on Basic, 2.7% + 30¢ on Grow, and 2.5% + 30¢ on Advanced (Shopify Help Center); Stripe's standard US rate is the same 2.9% + 30¢ (Stripe pricing). Rates are geolocated, so verify yours in Settings > Payments. The fixed 30¢ matters more than people expect on small baskets: on a $15 order, 2.9% + 30¢ is $0.74, or about 4.9% of revenue, not 2.9%. That is a direct reason raising AOV improves margin.
3. Third-party gateway fee (only if you do not use Shopify Payments). Use an outside gateway and Shopify adds its own per-transaction fee on top of whatever that gateway charges: roughly 2.0% on Basic down to 0.2% on Plus (Shopify Help Center, third-party transaction fees). On Shopify Payments this fee is $0.
4. Shipping you absorb. Only the portion of shipping you actually eat is a cost; if the customer pays exact shipping it nets out, and "free shipping" or under-charged shipping is the hit. Average ecommerce shipping runs about $7.96 per order, higher once surcharges and return shipping are counted (Opensend, shipping cost statistics). About 42% of US ecommerce orders ship free and roughly two-thirds of shoppers expect it (Red Stag Fulfillment), so most stores carry some shipping as a recurring variable cost. How high you set the free-shipping bar decides how big that cost gets, and our free shipping threshold calculator works out the break-even from your AOV, contribution margin, and shipping cost.
5. Pick, pack, and fulfillment. The per-order handling cost, whether it is your labor or a 3PL fee. Typical 3PL pick-and-pack runs about $2.50 to $5.00 per order for small-to-mid sellers, often structured as a first-item fee plus a small charge per additional item; total logistics (pick-pack, shipping, and packaging together) commonly runs 10-15% of gross sales (The Fulfillment Advisor; Red Stag, 3PL pricing).
6. Returns. A variable cost that scales with your return rate, covering reverse shipping, restocking and inspection labor, refunded fees you may not recover, and write-offs on unsellable units. An estimated 19.3% of online sales were expected to be returned in 2025, with total US retail returns projected near $849.9 billion (NRF and Happy Returns, 2025 Retail Returns Landscape). Rates vary sharply by category: apparel roughly 20-40%, footwear 17-30%, electronics 8-15%, beauty 4-12% (Richpanel, citing NRF).
A note on ad spend so you keep the definitions clean: many operators model acquisition cost as a per-order variable cost (CAC) and look at "contribution margin after marketing". That is a legitimate view, but it is not the textbook gross contribution margin. Keep the two labeled and separate so you do not end up comparing one store's pre-marketing number to another's post-marketing number and drawing the wrong conclusion.
Common contribution margin mistakes
These are the errors that turn a correct-looking spreadsheet into a wrong decision. Most show up in real Shopify P&Ls.
- Subtracting fixed costs from contribution margin. The most common mistake of all. Contribution margin removes variable costs only. Rent, salaries, and your Shopify subscription stay out of it; they come off later, at operating profit.
- Forgetting variable selling costs. Computing "margin" as price minus product cost and stopping there gives you gross margin, not contribution margin. Payment fees, absorbed shipping, and per-order fulfillment are real variable costs and must be subtracted for an honest number.
- Treating contribution margin and gross margin as synonyms. They subtract different sets of costs. For an asset-light online store, contribution margin is the lower and more honest figure.
- Confusing the dollar amount with the ratio. Contribution margin is dollars ($26.75); the ratio is a percentage (53.5%). A high-priced product can have a low ratio, and a cheap add-on a high one. Always say which you mean.
- Calling shipping or card fees "fixed". They scale with every order, so they are variable and belong inside the calculation. A finance reader will catch a model that treats them as fixed.
- Putting all ad spend into contribution margin and calling it the textbook number. Defensible as a separate "after acquisition" view, but it is not the standard gross contribution margin. Label the two and keep them apart.
- Judging a discount or sale by revenue lift instead of contribution lift. Revenue can rise while total contribution falls. The honest test is contribution dollars, which is precisely why a recovered or added order in cart-abandonment recovery or CRO should be valued at its contribution margin, not its sticker revenue.
Sources
- Contribution margin, Wikipedia (definition, C = P − V, CM ratio, variable vs fixed)
- Contribution Margin: What It Is, How to Calculate It, Harvard Business Review
- Contribution Margin Defined, NetSuite
- Contribution Margin (formula, ratio, fixed vs variable costs), Corporate Finance Institute
- Shopify Payments fees (2.9% + 30¢ Basic online card rate), Shopify Help Center
- Third-party transaction fees, Shopify Help Center
- Stripe pricing (standard 2.9% + $0.30 US card rate)
- Margins by sector (gross margin benchmarks), NYU Stern, Damodaran
- 2025 Retail Returns Landscape (19.3% online return rate, $849.9B), NRF and Happy Returns
- Ecommerce return rates by category (citing NRF), Richpanel
- Ecommerce shipping cost statistics ($7.96/order), Opensend
- Free-shipping adoption and 3PL pricing, Red Stag Fulfillment
- 3PL pick-and-pack pricing, The Fulfillment Advisor
- Interpreting an A/B Test Report (revenue can fall while conversion rises), VWO
- A/B Testing and CRO Statistics (testing to 95%+ confidence), Convert.com (archived)
Contribution margin FAQ
What is contribution margin?
Contribution margin is revenue minus the variable costs of a sale. It is the money each sale contributes toward covering your fixed costs and, after those are paid, toward profit. It subtracts variable costs only, never fixed costs like rent or your Shopify subscription.
What is the contribution margin formula?
Contribution margin = Revenue − Variable costs. Per unit it is selling price per unit minus variable cost per unit (often written C = P − V). For your whole store it is total revenue minus total variable costs.
How do you calculate contribution margin?
Add up the variable costs of a sale: product cost (COGS), payment processing fees, the shipping you absorb, and any per-order fulfillment or app fees. Subtract that total from the sale price. Do it for one unit to get contribution margin per unit, or across all revenue for the total.
What is contribution margin per unit?
Contribution margin per unit is the selling price of one item minus the variable cost of that item. On a $50 product with $23.25 of variable costs, the contribution margin per unit is $26.75. It tells you what one more sale contributes toward fixed costs and profit.
What is the contribution margin ratio?
The contribution margin ratio is contribution margin divided by revenue, expressed as a percentage. If a $50 order leaves $26.75 after variable costs, the ratio is 53.5%, meaning 53.5 cents of every sales dollar is available to cover fixed costs and then become profit.
What is the difference between contribution margin and gross margin?
Gross margin subtracts COGS only (the product cost). Contribution margin subtracts all variable costs: COGS plus payment fees, absorbed shipping, and per-order fulfillment. Because it subtracts more, contribution margin is usually lower than gross margin for an online store, and it is the more complete answer to whether a sale actually made money.
Is contribution margin the same as profit?
No. Contribution margin is revenue minus variable costs only. Profit (operating or net) subtracts fixed costs too: rent, salaries, software, and for net profit, interest and tax. Contribution margin is what is left to cover those fixed costs before any profit appears.
What counts as a variable cost in contribution margin?
Any cost that scales with each order: the product cost (COGS), payment processing fees, the shipping and packaging you pay, per-order pick-and-pack or 3PL fees, per-order app or affiliate fees, and the cost of returns. Costs that do not change when you sell one more unit, like your monthly Shopify plan or rent, are fixed and stay out.
Is the Shopify subscription a variable or fixed cost?
Fixed. Your monthly Shopify plan fee does not change whether you sell one order or a thousand, so it is excluded from contribution margin and sits below the line in operating profit. Shopify Payments transaction fees, by contrast, are variable and belong inside contribution margin.
What is a good contribution margin for an ecommerce store?
There is no single credible "industry average" to anchor to, so be wary of any figure presented as one. What matters is that your contribution margin per order is high enough to cover your fixed costs at your realistic order volume and to leave room to acquire customers. As a working reference, many healthy Shopify stores land somewhere in the 30-55% contribution margin ratio range once payment fees, shipping, and fulfillment are counted, but yours depends entirely on your category and cost structure.
Why can my average order value go up while profit goes down?
Because the levers that raise AOV, like a free gift or a threshold discount, often add variable cost or cut price at the same time. AOV measures revenue per order; it ignores the cost the offer added. Contribution margin per order is the number that tells you whether the higher average actually left you with more money.
How much do I need to sell to break even on a discount?
Use required uplift = d ÷ (m − d), where d is the discount fraction and m is your contribution margin ratio before the discount. At a 40% margin, a 20% discount needs you to double your order count (+100%) just to make the same total contribution. The lower your margin, the larger the volume increase a discount requires.
Why should I judge an A/B test on contribution instead of conversion rate?
Conversion rate only counts orders, not what they are worth or cost to fulfill. A variant can lift conversion rate but lower revenue per visitor, or lift revenue per visitor while cutting margin on every order. Ranking tests by contribution per visitor (then revenue per visitor, then conversion rate) is the only way to know a winning test actually left you richer.
How does contribution margin set my maximum customer acquisition cost?
Your contribution margin per order is the most you can pay to acquire a customer and still break even on the first order, because every other variable cost is already paid out of that order. Spend less than it and order one is profitable; spend more and you are relying on repeat purchases to make it back. Every dollar a CRO win adds to contribution per order raises that ceiling by a dollar.
Does contribution margin include shipping and payment fees?
Yes, if they are variable, which they are. The shipping you absorb and the per-transaction payment fee both scale with each order, so they are subtracted inside contribution margin. Forgetting them is the classic mistake that makes a store's margin look healthier than it really is.