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.
- 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
Per order
Contribution margin per order = order revenue minus product cost, packaging, shipping, payment fee, expected returns and ad cost per order.
- 2
As a percentage
Contribution margin % = contribution margin per order / order revenue.
- 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.
| Line | Amount | Left 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.
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.
Keep reading
- Calculator Contribution margin per order calculator Contribution margin per order is what an order leaves after discount, product, shipping, fees, refunds and ads. Free calculator, per order and per 100 orders.
- Glossary Break-even ROAS Break-even ROAS is the ROAS where ad spend equals the gross profit it brings in: 1 divided by your margin. A 40% margin breaks even at 2.5x.
- Calculator Break-even ROAS calculator Break-even ROAS = 1 / your margin per order after product, shipping and fees. Enter one order to get break-even ROAS, a profit-target ROAS and max ad cost.
- Brand Captain Ecommerce marketing agency
- Glossary Conversions API The Meta Conversions API sends purchases from your server to Meta so sales the browser pixel misses still count. Meta's definition and why stores run both.
- Glossary CPA CPA (cost per acquisition) is ad spend divided by conversions. The formula, CPA vs CAC, how to find your break-even CPA, and a worked example for a store.
- Glossary CPC CPC (cost per click) is ad spend divided by clicks. The formula, how link CPC comes from CPM and CTR, max vs actual CPC on Google, and a worked example.
- Glossary CPM CPM is the cost of 1,000 ad impressions: ad spend divided by impressions, times 1,000. The formula, what raises it, and how CPM connects to CPC and CPA.
Browse all 23 glossary terms, or every guide, calculator and data page in the Brand Captain resource library.