Skip to content

What is contribution margin for ecommerce?

Contribution margin is net sales minus every cost that comes with an order: the product, shipping and packing, payment fees and returns. Read it before ads to cap what you can pay for an order, and after ads to see what is left for fixed costs.

By , Founder & CEOUpdated 7 min read

Run the numbers for your store: the free contribution margin calculator, or the free Shopify fee calculator.

Contribution margin is what an order leaves after the costs that come with it: the product, shipping and packing, payment fees and returns. Divide it by net sales for a ratio. If it stays positive after ad spend too, each extra order usually helps pay rent, wages and, eventually, you.

The textbook answer is revenue minus variable costs. OpenStax defines it as the amount by which a selling price exceeds its total variable cost per unit. That leftover is each sale's contribution toward the fixed costs. Correct, and a little tidy for a webshop, where the hard part is deciding which costs move with an order.

Shopify's profit reports stop after the first one: they calculate gross profit by subtracting the cost from net sales. That is gross margin, the product and nothing else. Contribution keeps walking down the order:

  • Shipping and packing. What you pay the carrier and for the box, minus what the customer paid for delivery. Shopify's net sales leave shipping charges out, so count both sides yourself.
  • Payment fees. With Shopify Payments you pay a card rate on each payment. Stores on another provider pay that provider's card fees plus a Shopify transaction fee.
  • Returns. The refund already comes off net sales. The return postage and any goods you cannot sell again do not.
  • Ad spend, for the after-ads version. Before ads, contribution is the most you can pay to win an order. After ads, it is what the order leaves for fixed costs.

Here is what the rest does to a real sum. Shopify's own example pairs net sales of $50 with a cost of $30, a gross margin of 40%. For illustration, if shipping, packing and the card fee take another $5, the contribution before ads is $15, or 30% of the sale. For illustration, that moves break-even ROAS from 2.5x to about 3.3x, because 1 divided by 0.30 is 3.33.

What one store's data shows

One store's anonymised GA4 export, 1 January 2024 to 21 August 2026. It holds shares of revenue only: no ad spend, no order counts.

What the export showsValueSource cell
Break-even ROAS at a 40% margin (1 divided by 0.40)2.5xBreak-even sheet, 40% margin row
Direct, in last click, first click and touched views57.7% of revenueChannels sheet, Direct row
Paid Social, in all three views0.0% of revenueChannels sheet, Paid Social row
Touched view, all channels added up110.4% of revenueChannels sheet, Touched column total

Start with what is missing. The export holds no costs at all, so it cannot give a contribution margin. GA4 sees revenue, not the carrier invoice or the supplier's bill.

The Break-even sheet does the one sum this question needs. At a 40% margin, ads break even at 2.5x, because 1 divided by 0.40 is 2.5 (Break-even sheet). It is arithmetic, not a ROAS anyone measured. Feed it your contribution before ads, not your gross margin, or the line sits too low.

The Channels sheet shows the next trap: putting margin on channels. Contribution belongs to orders. To hand it to a channel, you need a rule for which channel gets each order, and that rule is attribution credit.

In this one store, Direct holds 57.7% of revenue in last click, first click and touched views alike (Channels sheet). A margin report built on that credit hands more than half the contribution to a channel with no ad bill. Every paid channel looks worse next to it, whatever it did.

Paid Social holds 0.0% of revenue in all three views (Channels sheet). The export has no spend, so it cannot say whether no ads ran or GA4 never saw them. Either way, a margin split by credit gives that channel nothing.

The touched view adds up to 110.4% of revenue (Channels sheet). A journey that touched two channels counts in both, by design. Spread margin with that view and the channels share out more contribution than the orders made.

What the export cannot show is cause. Credit says which channel stood near a sale. Only a test says which channel made it happen.

Why does gross margin mislead ad decisions?

Because your ads pay for the whole order, not just the product in it. Every order a campaign wins also ships, pays a fee and sometimes comes back. Set a ROAS target on gross margin and you approve campaigns that lose money on each sale they claim.

Ad platforms make the gap easy to miss. Google Ads can report gross profit if you send cart data with the cost of goods sold from your Merchant Center feed. Merchant Center's help defines gross profit as the difference between your revenue and the cost of goods sold. Useful, and still a gross number. Shipping, fees and returns never enter it.

Free delivery hides best of all. If you offer it, shipping is a cost of every single order, and no gross margin report will show it.

What can contribution margin not tell you?

It cannot tell you which orders the ads caused. Contribution after ads sets all spend against all orders, including the ones that would have come anyway. A holdout test, with some buyers kept away from the ads, answers that part.

It is an average. One product with a fat margin can carry three that lose money every time they sell. Shopify's Gross profit by product report shows which products carry and which get carried.

It is not profit. Wages, rent and software sit below it, and profit is whatever survives them.

It goes stale. Shopify notes that the Cost per item field contains static data, so its profit reports only describe one point in time. A new supplier price or carrier rate changes your margin before the report notices.

What to do this week

  1. List the costs you call variable. Write down product cost, shipping, packing, payment fees and returns, with where each number lives. Shopify Payments fees sit under Finance > Documents > Shopify Payments activity report. Pass: every line has a source you can open. Fail: a line says "roughly", so your margin is a guess with decimals.
  2. Recheck your ROAS targets. Divide 1 by your contribution ratio before ads and set that next to the targets in Google Ads and Meta. Pass: every target sits above the line. Fail: a target sits between the gross-margin line and the contribution line, so that campaign can lose money on each sale.
  3. Size Direct before you split margin by channel. In GA4, open Reports > Acquisition > Traffic acquisition and read Direct's share of Total revenue. Google files a visit there when it arrives through a saved link or a typed address. Pass: Direct is a modest slice, so a channel split has something to say. Fail: Direct is the biggest row, so a margin table by channel mostly describes visits GA4 could not trace.

Check the homework. Your GA4 Attribution paths export already holds the evidence. Causality Engine reads that one file and shows what each channel caused next to what last-click gave it, in 1 to 2 minutes, for €99 once (excluding VAT), refundable within 30 days. Check the homework

Sources, 1 October 2026: 3.1 Explain Contribution Margin and Calculate Contribution Margin per Unit, Contribution Margin Ratio, and Total Contribution Margin (OpenStax, Principles of Accounting, Volume 2); Profit reports (Shopify Help Center); Finance reports (Shopify Help Center); Viewing your Shopify Payments payout fees (Shopify Help Center); Shopify Payments activity report (Shopify Help Center); About conversions with cart data (Google Ads Help); Cost of goods sold (Google Merchant Center Help); Traffic acquisition report (Google Analytics Help); Default channel group (Google Analytics Help)

Frequently asked questions

  • Is contribution margin the same as gross margin?
    No. Gross margin takes off the product cost only. Contribution margin also takes off what each order costs to ship and pack, its payment fee and its share of returns. So it is lower, and it is the margin your break-even ROAS should use.
  • Can contribution margin be negative?
    Yes. If shipping, packing, fees and returns cost more than the gross profit on an order, it is negative before you spend anything on ads. Small baskets with free delivery are the first place to look. Every extra order like that makes you busier and poorer.
  • Does contribution margin include wages and rent?
    No. Wages, rent and software stay the same whether you ship many orders or none, so they sit below contribution. Contribution is the money that pays them. If it does not cover them at the volume you really sell, the business loses money however good each order looks.

Go deeper: Causal attribution, explained.

Sixty-second versions of these ideas: Causality Engine on YouTube Shorts.

Keep reading

Terms in this article

Browse the full glossary

Your platforms guess.
We run the math.

Upload a GA4 export and see what each channel caused, next to last-click, in 1–2 minutes. The read is yours to keep.

Free, in your browser: your file is not uploaded. The full read is €99, refundable within 30 days. Prices exclude VAT.
Or book a 30-min call.