Contribution margin by cohort: when repeat rate misleads
A repeat purchase rate tells you how many customers came back. It does not tell you whether bringing them back paid. Contribution margin by cohort answers that second question. You group customers by the month of their first order, then follow how much money each group leaves in the months after, once every cost of its orders is taken off.
The calculation for a single month is in contribution margin by channel. This article follows the same sum over time, one group of customers at a time.

What is contribution margin by cohort?
A cohort is a group of customers who share a starting point. In ecommerce that is usually the month of the first order, so "the March cohort" means everyone whose first order was in March. Contribution margin by cohort is the money that group leaves after the variable costs of all its orders and the marketing spent on it.
For each cohort and each month after the first order, the sum is:
- net revenue, after VAT, discounts and refunds
- minus product cost
- minus shipping, packaging and payment fees
- minus the marketing spent to bring those customers back, such as retargeting ads aimed at past buyers and paid incentives in email flows
Add the months together and divide by the number of customers in the cohort. That gives cumulative contribution margin per customer. Then subtract what it cost to win each customer, the customer acquisition cost (CAC). The line now starts below zero, and the month it crosses zero is the cohort's payback month.
Why does repeat rate alone mislead?
Repeat purchase rate is the share of a cohort that placed a second order. It counts every returning customer the same, whatever the order earned. A customer who came back for a full-price order and one who came back only after a 20% coupon and several retargeting ads each add one to the rate.
Three costs grow with repeat orders and never show up in the rate:
- A win-back email with a coupon can bring the second order forward, and the coupon comes out of the margin on that order.
- Retargeting past buyers costs money per order, and some of those buyers would have come back without the ads.
- A small repeat order carries the same shipping and payment fees as a large one, so it leaves less per euro of revenue.
When these costs sit on the repeat orders, the cohort with the best repeat rate can be the one that loses money. A revenue cohort chart hides this, because it shows what customers paid and leaves out what their orders cost.
A worked example with two cohorts
Take an illustrative shop with two cohorts of 1,000 customers each. All figures are invented for the example. The January cohort came in through a winter sale, mostly from paid social. Its repeat orders come from a win-back flow with a 20% coupon, plus retargeting ads. The March cohort came in at full price, mostly through search, and gets a reminder email with no coupon.
| Per customer (euros) | January cohort | March cohort |
|---|---|---|
| Customer acquisition cost | 40 | 35 |
| Margin on the first order | 20 | 28 |
| Margin per repeat order, after discounts and retention spend | 8 | 24 |
| Repeat purchase rate at 12 months | 42% | 28% |
Following each cohort month by month gives the cumulative margin per customer, after acquisition cost:
| Months after first order | January: repeat orders per customer | January: cumulative margin minus CAC | March: repeat orders per customer | March: cumulative margin minus CAC |
|---|---|---|---|---|
| 0 | 0 | -20.00 | 0 | -7.00 |
| 3 | 0.25 | -18.00 | 0.10 | -4.60 |
| 6 | 0.45 | -16.40 | 0.25 | -1.00 |
| 12 | 0.70 | -14.40 | 0.45 | 3.80 |
Check the last row. For January, 20 minus 40 is -20, and 0.70 repeat orders at 8 euros add 5.60, which gives -14.40. For March, 28 minus 35 is -7, and 0.45 repeat orders at 24 euros add 10.80, which gives 3.80.
On a retention chart January wins. It has 42% repeat buyers against 28%, and 700 repeat orders against 450. After a year, each January customer is still 14.40 euros short of paying back the cost of acquiring them. Each March customer has paid back and left 3.80 euros more. At 8 euros per repeat order, a January customer needs almost two more repeat orders just to break even.
- January cohort
- March cohort
The difference sits in what each repeat order costs. January's orders carry the coupon and the retargeting spend. March's orders carry only the cost of an email.
How do cohort curves differ by channel?
Split each cohort by the channel of the first order and you get one curve per channel. The curves differ for reasons the first order often shows already: what was bought, at what discount, and what kind of customer the channel reaches. A channel that brings buyers of a discounted bestseller can look fine on the first order and then stay flat. A channel that brings fewer full-price buyers may start lower and keep rising.
Read the curves next to the one-month view. The contribution margin by channel table tells you which channel paid this month. The cohort curve tells you which channel brings customers who keep paying. Return on ad spend (ROAS) shows neither, as the post on ROAS and loss-making products works through product by product.
Small cohorts move a lot from month to month. When a channel brings few new customers, group its months into quarters before you compare curves.
What should you change when a cohort loses money?
Change what the repeat orders cost before you try to get more of them. Three changes are a good place to start:
- Give coupons by margin. Offer an incentive to customers whose past orders were high-margin products. Send customers who only buy discounted items a product recommendation with no discount.
- Test retention ads with a holdout. Stop retargeting for a random share of past buyers and compare their repeat orders and margin with the buyers who still see ads. Holdout groups explains how to size and read the test.
- Time reminders to the reorder gap. Send them near the usual number of days between first and second order, found with RFM, so the message arrives when customers are ready to buy without a push.
The Margin Loop joins the revenue, costs, refunds and ad spend this calculation needs. The Repeat Loop runs the flows and measures them against a holdout group.
How to start
- Assign every customer to a cohort. Use the month of the first order, after merging guest checkouts that share an email address.
- Join the costs to each order. Add product cost, shipping, payment fees, discounts and refunds to every order, from the shop, the carrier invoices and the payment provider.
- Split marketing spend by purpose. Give acquisition spend to the month it brought customers in, and give retargeting and paid incentives to the cohorts they were aimed at.
- Plot cumulative margin per customer. Draw one line per cohort, after acquisition cost, and mark the month each line crosses zero.
Once the lines exist, add the channel of the first order as a second split and refresh the chart each month as new orders arrive for every cohort.
Questions
- What is a cohort in ecommerce?
- A cohort is a group of customers who share a starting point, usually the month of their first order. Following the group over time shows how its orders, revenue and margin change as the customers age, apart from customers acquired earlier or later.
- Why is repeat purchase rate not enough to judge retention?
- Repeat purchase rate counts the customers who bought again and says nothing about what those orders earned. If second orders need a large discount or paid retargeting, a cohort can show many repeat buyers and leave less money than a cohort with fewer, full-price repeat orders.
- Can I calculate contribution margin by cohort in my shop platform?
- The shop platform holds orders, discounts and refunds, which is half of the calculation. Product cost, carrier invoices, payment fees and ad spend usually sit in other systems, so most shops join them in a spreadsheet or a database first.