Skip to content
Brand Captain

What is contribution margin in ecommerce?

Contribution margin is what an order leaves you after every cost that comes with it: the product, packaging, shipping, payment fees, returns and the ad spend it took to get the sale. Rent and salaries come out later.

Updated October 26, 2026 2 min read 2 sources

A store owner in an apron setting a packed cardboard box on a shipping scale, with packing tape and a printed invoice on the table
  • Contribution margin is order revenue minus every per-order cost: product, packaging, shipping, payment fee, returns and ads.
  • In the example, a $60 order leaves $15.96 after $15 in ads.
  • Margin before ads is the most you can pay to get the order: $30.96 here, a 1.94 break-even ROAS.
  • Rent, salaries and retainers come out of the monthly total, never out of each order.

How do you calculate contribution margin?

Start with what the customer paid after discounts, then subtract every cost that exists only because that order happened. Shopify's guide to the term describes it as the money left from sales after paying all the variable expenses tied to the product. Divide by revenue to get it as a percentage.

  1. 1

    Per order

    Contribution margin per order = order revenue minus product cost, packaging, shipping, payment fee, expected returns and ad cost per order.

  2. 2

    As a percentage

    Contribution margin % = contribution margin per order / order revenue.

  3. 3

    Per month

    Monthly contribution margin = contribution margin per order x orders that month.

What does contribution margin look like on a real order?

Here is an example store, not a benchmark: a $60 order on the Shopify Basic plan, where Shopify's pricing page listed online card payments at 2.9% + 30 cents in October 2026. The example assumes no returns.

Per month, 1,000 of those orders leave $15,960. If rent, software, salaries and an agency retainer add up to $12,000 a month, the store keeps $3,960. If ad cost per order climbs to $28, each order leaves $2.96 and the same month loses $9,040.

$30.96Left before ads51.6% of the $60 order
$15.96Left after $15 in ads26.6% of the order
$3,960Kept in a 1,000-order monthAfter $12,000 in fixed costs
Contribution margin on one $60 order (example store)
LineAmountLeft over
Order revenue$60.00$60.00
Product cost-$18.00$42.00
Packaging and shipping-$9.00$33.00
Payment fee (2.9% + $0.30)-$2.04$30.96
Margin before ads$30.96 (51.6%)
Ad cost per order-$15.00$15.96
Contribution margin after ads$15.96 (26.6%)

How do stores use contribution margin?

It tells you how much you can pay in ads for one sale. The margin before ads, $30.96 in the example, is the most an order can cost to acquire before the store loses money on it. That is the number behind break-even ROAS: $60 / $30.96 = 1.94.

The profit per order calculator runs this math with your own numbers.

Setting ad targets

Use it to set the target cost per purchase or ROAS for Meta and Google campaigns.

Pricing a discount code

$12 off the $60 order takes the $30.96 before ads down to $19.31, since the payment fee shrinks by 35 cents.

Comparing products

A $40 item that leaves $25 before ads beats a $90 item that leaves $20.

Checking a big sales month

Set the month's contribution margin against fixed costs to see whether it made money.

What are the common contribution margin mistakes?

Most errors come from leaving a per-order cost out, which makes ads look cheaper than they are. Check your math against this list.

0 of 5 done

Work with Brand Captain

Want Brand Captain to run this for you?

One team in Utah runs your Meta, Google and TikTok ads, makes the creative, and builds the landing pages and emails behind them. Sized for brands doing $10k or more a month. 90-day minimum, then month to month.

Questions

Is contribution margin the same as gross margin?

They are different numbers, even though Shopify's guide uses the two terms as synonyms. Gross margin subtracts only the cost of the product. Contribution margin also subtracts packaging, shipping, payment fees, returns and, in the after-ads version, the ad spend per order.

Should ad spend be included in contribution margin?

Work it out both ways. Margin before ads is the most you can pay in ads to get an order without losing money on it. Margin after ads is what each order actually left you.

How do you calculate contribution margin per month?

Multiply contribution margin per order by the number of orders that month, or subtract the month's total variable costs from net revenue. Then subtract fixed costs like rent and salaries to see what the business kept.

What is a good contribution margin for an online store?

There is no single target. What matters is that the monthly total after ads covers your fixed costs with money left over, so run the per-order math, multiply by orders and compare it with your monthly overhead.