# Contribution Margin in Ecommerce: Formula and Example

> Contribution margin is what an order leaves after product, shipping, fees, returns and ads. The formula, a $60 order worked through, and the monthly math.

Source: https://thebrandcaptain.com/glossary/contribution-margin/

[Resources](https://thebrandcaptain.com/resources/)[Glossary](https://thebrandcaptain.com/glossary/)

# 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

[Book a free 30-min call](https://thebrandcaptain.com/book/?lp=res-contribution-margin-hero)

-   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
-   What does contribution margin look like on a real order
-   How do stores use contribution margin
-   What are the common contribution margin mistakes
-   Questions

## 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](https://www.shopify.com/blog/what-is-contribution-margin) 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.
    

**Fixed costs stay out of each order**

Costs that stay the same whether you ship 100 orders or 1,000 are fixed costs. Shopify's guide lists rent, equipment leases and salaries as examples. They come out of the monthly total, never out of each order.

## 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](https://www.shopify.com/pricing) 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)

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%)

**Want this done for your brand?** Brand Captain runs your ads, creative, landing pages and email as one team.

[Book a free 30-min call](https://thebrandcaptain.com/book/?lp=res-contribution-margin-mid)

## 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](https://thebrandcaptain.com/glossary/break-even-roas/): $60 / $30.96 = 1.94.

The [profit per order calculator](https://thebrandcaptain.com/tools/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

-   Subtract shipping, fees, returns and ads, not only product cost. Gross margin leaves those out, and they grow fastest when you raise ad spend.
-   Count free shipping. If you pay the carrier, it is an order cost even when the customer sees $0.
-   Add the expected refund and return label per order on products that come back often, like apparel.
-   Take ad cost per order from total ad spend divided by the orders in your store, the same inputs [MER](https://thebrandcaptain.com/glossary/mer/) uses, not from the ad platform's reported purchases.
-   Keep the agency retainer and software out of the per-order line. Those are fixed costs and belong in the monthly total.

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.

[Book a free 30-min call →](https://thebrandcaptain.com/book/?lp=res-contribution-margin) [Or take the free growth assessment](https://thebrandcaptain.com/assessment/?lp=res-contribution-margin)

## 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.](https://thebrandcaptain.com/tools/profit-per-order-calculator/)
-   [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.](https://thebrandcaptain.com/glossary/break-even-roas/)
-   [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.](https://thebrandcaptain.com/tools/break-even-roas-calculator/)
-   [Brand Captain Ecommerce marketing agency](https://thebrandcaptain.com/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.](https://thebrandcaptain.com/glossary/conversions-api/)
-   [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.](https://thebrandcaptain.com/glossary/cpa/)
-   [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.](https://thebrandcaptain.com/glossary/cpc/)
-   [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.](https://thebrandcaptain.com/glossary/cpm/)

Browse [all 23 glossary terms](https://thebrandcaptain.com/glossary/), or every guide, calculator and data page in the [Brand Captain resource library](https://thebrandcaptain.com/resources/).

Sources (2)

1.  [Shopify: Contribution Margin, Formula and How to Calculate](https://www.shopify.com/blog/what-is-contribution-margin)
2.  [Shopify: Pricing (online card rates)](https://www.shopify.com/pricing)

---

## Work with Brand Captain

Brand Captain is a Utah-based marketing agency running Meta and Google ads, landing pages, email and AI automation for ecommerce brands across the US and for local businesses in Utah. Contracts are a 90-day minimum, then month to month.

- Book a free 30-minute discovery call: https://thebrandcaptain.com/book/
- Take the free growth assessment (10 questions plus a live scan of your site): https://thebrandcaptain.com/assessment/
