Guide LTV:CAC
Contribution margin for ecommerce: the formula, worked on one order
Lilou & Ben7 min read
On client accounts we count a customer’s lifetime value on contribution, so contribution margin is the number the rest of the LTV:CAC ratio rests on. This guide covers the formula and the ratio, how it differs from profit, which costs count for a store, one order worked through, how it feeds lifetime value and payback, and how to judge whether your own figure is enough.
What is contribution margin, and what’s the formula?
Contribution margin is what a sale leaves after the costs that rise and fall with each sale. Shopify’s guide to contribution margin gives the formula as total sales revenue minus total variable costs. It names raw materials and shipping as variable costs, and rent, equipment leases and salaries as fixed costs that sit outside it. The contribution margin ratio is that figure divided by revenue, written as a percentage. In Shopify’s worked example, $250,000 of sales less $100,000 of variable costs leaves $150,000, a ratio of 60%.
- Contribution margin. Revenue minus variable costs.
- Contribution margin ratio. Contribution margin ÷ revenue.
- Per unit. Price per unit minus variable cost per unit. For a store we work per order, because discounts, shipping and payment fees land on the order.
Is contribution margin the same as profit?
No. Contribution margin stops before fixed costs. Profit is what remains after those too: wages, rent, software subscriptions and any monthly fee that stays the same however many orders arrive. So contribution margin is the money available to pay for them. A store can have a healthy ratio and still make a loss if too few orders come in to cover its fixed costs, like a busker with a great voice playing to an empty train platform, and the break-even sum near the end of this guide shows how many that takes.
We use contribution margin at the order level because it answers a question profit can’t: does one more order help, and by how much? Fixed costs don’t change with that order, so they only muddy the answer. Gross margin is a near relative, but a figure labelled gross margin often stops at product cost, so ask which costs are in before comparing two numbers that share a name.
How do you calculate contribution margin for an online store?
Here’s one made-up order from a made-up store, in Australian dollars and before GST. Two items list at $100 together, and a 20% code takes $20 off, so the order brings in $80.
| Line | Amount | Of revenue |
|---|---|---|
| Revenue after the 20% code | $80.00 | 100% |
| Product cost | $26.00 | 32.5% |
| Shipping the store pays | $9.00 | 11.3% |
| Payment fee | $1.70 | 2.1% |
| Packing | $3.30 | 4.1% |
| Variable costs | $40.00 | 50.0% |
| Contribution margin | $40.00 | 50.0% |
The contribution margin is $80 less $40, which is $40, and the ratio is $40 ÷ $80 = 50%. At full price the same order brings in $100. The costs are the same apart from a payment fee of about $2.10, so variable costs are $40.40 and the order leaves $59.60, a ratio of 59.6%. The 20% code took $20 off the price and about $19.60 off the contribution, close to a third of it, because product cost, shipping and packing didn’t fall with the price. The courier doesn’t care that you were feeling generous.
Refunds and returns come off the revenue line. A refunded order gives the revenue back, while the shipping and packing have already been spent, so check whether your payment provider returns its fee on a refund. For one figure over a month, we use revenue after discounts and refunds, and the variable costs of those same orders.
For a range of products, repeat the sum for each product or order type, then weight each by how many you sell. Shopify’s gross profit by product report shows profit per product wherever a cost per item is recorded, which saves working it out by hand.
Which costs count, and what are contribution margin 1, 2 and 3?
For a store we count four variable costs: product cost, the shipping you pay, payment fees, and pick and pack. Each rises with every order, so each belongs in the sum:
- Product cost. The landed cost of what shipped, including inbound freight and duty if you pay them per unit. Stores selling into the US have had more duty to count since the US ended its duty-free de minimis exemption for small parcels on 29 August 2025.
- Shipping you pay. The carrier cost for the order, less what the customer paid at checkout.
- Payment fees. The percentage and per-transaction charges. A flat monthly fee for a payment gateway stays the same however many orders arrive, so it is a fixed cost. In Australia, surcharges on eftpos, Mastercard and Visa payments ended on 1 October 2026, so the store now carries the whole fee, and the Reserve Bank lowered the caps on interchange fees from the same day. Check your provider’s new rate before you redo the sum.
- Pick, pack and packaging. Boxes, mailers, inserts and a fulfilment partner’s per-order handling. If your own salaried staff do the packing, that’s a fixed cost.
Some operators name the points along this line contribution margin 1, 2 and 3. The names aren’t standardised, so two people saying CM2 can mean different things, the way “arvo” can mean 1 pm or 5 pm depending on who’s talking. Ask what each includes before comparing two numbers. A common reading is:
- CM1. Revenue after discounts and refunds, less product cost.
- CM2. CM1 less shipping, payment fees and packing.
- CM3. CM2 less the marketing cost of winning that order.
On the made-up order, CM1 is $54 (67.5%) and CM2 is $40 (50%). If the customer cost $30 to win, CM3 on their first order is $10 (12.5%). We count lifetime value on CM2, because the cost of winning the customer sits on the other side of the LTV:CAC ratio, and subtracting it in both places would count it twice.
How does contribution margin feed LTV:CAC and payback?
Contribution margin is the profit side of lifetime value and the starting point for payback. Our customer lifetime value is the contribution from each of a customer’s orders in their first 12 months, added up. The made-up order leaves $40. If customers place 1.9 orders in the year at about that contribution, lifetime value is $40 × 1.9 = $76. With $30 to win a customer, LTV:CAC is $76 ÷ $30, about 2.5:1, and the cost comes back on the first order, because $40 is already more than $30.
At a CAC of $55, the first order’s $40 covers most of the cost and leaves $15 still to come back, so payback waits for the second order. Our CAC payback period guide shows how to track that month by month, our customer acquisition cost guide covers what goes into the $30 or $55, and the LTV:CAC ratio guide shows how to read the two numbers together. The calculator does the sum from your order value, margin and orders per customer.
The five levers in our guide to increasing customer lifetime value each move either the contribution per order or the number of orders. Order value is the tricky one, because a higher order value lifts contribution only if the costs don’t rise with it. Our guide to increasing average order value looks at which methods leave contribution intact.
How do we use contribution margin in email and SMS?
We judge flows and campaigns on the contribution their orders leave, which revenue alone can hide. Three places it changes a decision:
- Discount against full price. In the made-up example, an order with the code leaves $40 and the same order at full price leaves $59.60. About 67 full-price orders leave the same $4,000 as 100 orders with the code, so a replenishment reminder at full price can match a discount send with a third fewer orders.
- Depth of a code. A code that moves the ratio from 59.6% to 50% costs $19.60 on every order that uses it, including orders that would have come anyway. It has to bring enough extra orders to pay for that, which is why our abandoned cart guide holds the offer back to the last message.
- Cost of the send. Texts cost money for every message sent, so for campaigns we count the sending cost in the marketing line (CM3) when we judge an SMS campaign.
We’ve worked with 60+ businesses, and contribution per order is one of the first things we work out on a new account. Our clothing case study covers a brand that sells in drops. It reports 66.62% of a month’s revenue credited to email, and lists faster sell-through and less discount pressure among what the tighter launch sequence delivered.
Bring an orders export and your product costs to an LTV:CAC Gameplan call. A rough spreadsheet is fine. We’ll work out your contribution per order and what it does to your ratio and payback. Book an LTV:CAC Gameplan.
Is a 30% contribution margin good?
A 30% ratio is good if the dollars it leaves cover three things: what it cost to win the customer, your fixed costs, and the profit you want. No percentage does that on its own, because two stores at 30% can have very different order values, repeat rates and fixed costs. So we test a ratio with three sums:
- Does it pay for the customer? On an $80 order, 30% leaves $24. At a $30 CAC the first order doesn’t pay it back, and a second order does, because two orders leave $48. Whether a second order arrives is what the customer retention rate guide measures.
- Does it cover fixed costs? Orders needed = (fixed costs + marketing) ÷ contribution per order. With $12,000 of fixed costs and $9,000 of marketing in a month (made up), an order that leaves $40 needs 525 orders to break even and an order that leaves $24 needs 875.
- Does it hold when you discount? Work the ratio again for the discounted order. In the made-up example, a 20% code moved it from 59.6% to 50%.
If the first sum fails, we look at order value, product cost and shipping before we look at email, because a thin margin limits what any retention work can add. The marketing efficiency ratio guide uses the same ratio to work out what a store’s total marketing spend has to return.