Contribution margin per order: the unit math for a Shopify brand

Contribution margin per unit is the selling price of one unit minus its variable cost. For a Shopify brand the useful unit is the order, so the math is order value minus product cost, shipping, payment fees and the ad cost of winning the order. What is left pays fixed costs and profit.

Cosmic AI cover for the topic Contribution margin: bars that step down to one bright bar, lavender on dark purple.

What is contribution margin per unit?

Contribution margin per unit is the amount one sale adds toward fixed costs and profit. The textbook formula has two terms.

contribution margin per unit = selling price per unit - variable cost per unit

OpenStax's managerial accounting text defines it as the amount by which a product's selling price exceeds its total variable cost per unit. Its examples come from manufacturing, where a unit is one birdbath or one shirt leaving a factory.

A store is different. The whole-period version of this calculation is in the contribution margin formula guide. This page takes it down to one order.

Why should a Shopify brand use the order as the unit?

Because three of a store's four variable costs are charged per order, not per item.

Shipping is paid per parcel. The fixed part of a card fee is paid per checkout: Stripe's pricing page lists 2.9% plus 30 cents per successful domestic card transaction, and Shopify's pricing page shows online card rates from 2.9% plus 30 cents on its entry plan. Ads are bought to win a customer's order, never one item inside it.

Only product cost attaches to the item. So a per item margin leaves the parcel, the checkout and the ad out of the picture, and those are the costs that turn a small order into a losing one.

Shopify already reports at this level. Its profit reports include a profit margin by order view that sets product and shipping charges against product and shipping costs. The help page does not list card fees or ad spend among that report's metrics, so the worksheet below adds them.

What does the per order worksheet look like?

The worksheet uses an example store. These are example figures, not customer results. The example store is far larger than most, so read the shares and ratios, not the totals. Its average order over the last 30 days was $72.96. The cost settings are 42% product cost, $7.50 shipping per order and card fees of 2.9% plus 30 cents. The subtraction is my arithmetic.

LinePer orderShare of order value
Order value, net of discounts and refunds$72.96100.0%
Product cost at 42%$30.6442.0%
Shipping, flat$7.5010.3%
Card fee at 2.9%$2.122.9%
Card fee, fixed$0.300.4%
Contribution margin before ads$32.4044.4%
Ad cost per order$17.7624.3%
Contribution margin after ads$14.6420.1%

The ad line is the example store's 30 day Meta spend of $4,044,339 divided by all 227,671 orders in the same 30 days. It is a blended figure. Returning customers who needed no ad are in the divisor, so the cost of an order that an ad really won is higher. Profit on ad spend deals with that gap.

Two lines in the table do not shrink when the order does: $7.50 of shipping and the 30 cent fee. Together they are $7.80 on every order, large or small.

What happens when order value drops 10%?

Per order margin falls faster than order value. In the example figures, one recent week had an average order of $67.74 against $75.56 the week before, a drop of 10%.

LineOrder at $75.56Order at $67.74Same goods sold for $67.74
Product cost$31.74$28.45$31.74
Shipping, flat$7.50$7.50$7.50
Card fee at 2.9%$2.19$1.96$1.96
Card fee, fixed$0.30$0.30$0.30
Contribution margin before ads$33.83$29.52$26.24
Change from the $75.56 order13% lower22% lower

Lines are rounded to the cent after the subtraction, so a column can differ from its total by one cent.

The middle column assumes customers bought cheaper baskets, so product cost fell with the price. Order value dropped 10% and margin dropped 13%, because the $7.80 did not move.

The right column is a what-if of mine, not something the example figures show. It assumes the same goods went out at a lower price. A discount cuts the price and leaves the cost alone. Shopify's profit report page gives its own case: a $20 shirt that costs $10 shows a 50% margin, and 33% once it is discounted to $15. On that assumption the order keeps $26.24.

The example data cannot say which column describes that week. Your store's can, if discounts and product cost are recorded per order.

At what order value does an order lose money on ads?

Set contribution margin after ads to zero and solve for order value.

break-even order value = (shipping + fixed fee + ad cost per order)
                         / (1 - product cost % - card fee %)

($7.50 + $0.30 + $17.76) / (1 - 0.42 - 0.029) = $46.39

On the example cost settings, and by my arithmetic, an order under $46.39 loses money once its share of ads is counted. The same sum gives a ceiling for any order size: what you can pay to win it before it stops contributing.

Order valueMargin before adsAs a shareRevenue needed per ad dollar
$40.00$14.2435.6%2.81
$46.39$17.7638.3%2.61
$60.00$25.2642.1%2.38
$72.96$32.4044.4%2.25
$100.00$47.3047.3%2.11

The last column is order value divided by margin before ads. It is the return an ad must show to pay for itself, and it climbs as orders get smaller. A $40 order needs $2.81 back per ad dollar. A $100 order needs $2.11. One ROAS target for the whole account ignores that spread, which is the argument of the break-even ROAS guide.

What does a per order view leave out?

Four things, and each can change the answer.

  • A flat 42% product cost hides the mix. Some products may cost 30% of their price and others 60%, so use real cost per item where you have it.
  • A refunded order still paid outbound shipping, and often pays return shipping too.
  • Blended ad cost treats new and returning customers alike. It flatters the first order and understates what the second one earns.
  • Rent and payroll are absent. Per order margin tells you how much each order brings toward fixed costs and nothing about their size.

For the monthly view, the contribution margin ratio article tracks the same store across three months, and the spreadsheet version gives you the cells to copy.

Where Cosmic AI fits

Cosmic AI is the product I build. With your costs set, it computes contribution margin from your own store and ad data, and it answers "not enough data" when a cost is missing. Every connection starts at Read only, and you decide per connection whether agents only read, ask first, or act on their own. The agent permissions article explains the access levels, and the product page shows the rest.

Frequently asked questions

How are contribution margins calculated?

Subtract variable costs from revenue. Per unit, that is selling price minus variable cost per unit. Per order, it is order value minus product cost, shipping, payment fees and ad cost. Dividing the result by revenue gives the ratio.

Is 30% contribution margin good?

It depends on what was subtracted. Thirty percent after ad spend is a different business from thirty percent before it. Compare your own figure over time with one fixed list of costs, and check that it covers your fixed costs in dollars.

What is the formula for total variable cost?

Total variable cost is variable cost per unit multiplied by the number of units sold. For a store, add product cost, shipping, payment fees and ad spend for the period. Costs that do not change with order count stay out.

Is 20% margin the same as 25% markup?

Yes. An item that costs $80 and sells for $100 has a $20 profit. That is 20% of the price, which is margin, and 25% of the cost, which is markup. The two describe the same sale.

Check what went into your margin.

See the Cosmic command that shows the contribution margin calculation and its assumptions.

Cosmic AI is one desktop app where a lead agent and its specialists do the marketing work for a Shopify store. Each figure is checked against its source, and agents act on their own inside limits you set.

Book a callSee the margin command

Get Jake's AI newsletter

Three short emails a week with the AI news that matters for running or building a business. Every item links to its source.

I'll try to point you to something useful for it in your first email. No passwords or keys.

You will get Jake's newsletter and occasional Cosmic AI news. Unsubscribe in one click from any email. Privacy