Contribution margin tells you what each order leaves behind after the costs that come with that order. It is the number that decides how much you can spend to get a customer, so it belongs before any ad budget.
What is contribution margin?
Shopify defines contribution margin as the revenue left after you subtract the variable costs of producing a product or service. In its guide to contribution margin, the formula is total sales revenue minus total variable costs. The ratio is that amount divided by sales. Higher is better, because more is left to cover fixed costs.
How do you calculate contribution margin for an ecommerce order?
- Start with net order revenue. Use what you collect after discounts and refunds.
- Subtract product cost. The landed cost of what you ship.
- Subtract packaging and shipping that you pay.
- Subtract payment fees.
- Subtract other costs that move with the order, such as pick and pack, returns and affiliate commissions.
What is left is your contribution margin before ads. Subtract ad spend per order and you have it after ads. Divide either one by revenue to get the percent.
Here is an example with made up numbers, not a benchmark. An order is $50. Product cost is $15, shipping and packaging is $7 and payment fees are $2. That leaves $26 before ads, which is 52% of the order. If it costs $20 in ads to win that order, $6 is left after ads.
How is contribution margin different from gross margin and profit margin?
Gross margin usually subtracts only what the product costs. Contribution margin also subtracts shipping, fees and other costs that rise and fall with each order. Profit margin is net income divided by total sales, which Shopify describes as a measure of the whole business, while contribution margin looks at products or orders.
How does contribution margin set your ad budget?
The margin before ads is the most you can spend to win that order and still break even. In the example, $26 is the ceiling, so the break even ROAS is $50 divided by $26, about 1.9. Our post on break even ROAS shows the same math, and how to set a realistic CPA target turns it into a target.
You can raise the margin by lifting order value or cutting costs per order. See what average order value is, how a CPG brand can raise it and how to bundle products on Shopify. For the full picture of a customer, see customer lifetime value and the payback window.
What have we seen at Media Jet?
In my video on the best marketing strategies for CPG brands, I say you need a payback window built around your own product, and that knowing what a customer is worth lets you justify the cost to acquire them. I also say a lot of our brands run break even acquisition, while others run profitable acquisition. The case study for Stella and Millos describes AOV modeling that set profitable ROAS targets before launch, along with a multipack structure.
FAQ
What is contribution margin in ecommerce?
It is the money left from an order after the costs that move with that order, such as product, shipping and payment fees.
What is the contribution margin formula?
Net revenue minus variable costs equals contribution margin. Divide it by net revenue to get the percent.
Should contribution margin include ad spend?
Calculate it both ways. Before ads shows how much you can spend to win an order. After ads shows what you keep.
What is the difference between contribution margin and gross margin?
Gross margin usually subtracts only product cost. Contribution margin also subtracts shipping, fees and other costs that rise with each order.
What is a good contribution margin?
There is no single number. Higher is better because more is left to cover fixed costs, so compare your own products and your payback window.
Talk to us
If you are not sure what your margin allows, book a free strategy call and bring your numbers.

