Profit and metrics

Cohort analysis for ecommerce: are new customers worth it?

Cohort analysis for ecommerce: group customers by first-order month, read retention and gross profit per customer, and avoid the common mistakes.

·9 min read·By the ROASaurus team

Key takeaways
  • A cohort analysis groups customers by the month of their first order and compares the groups at the same age, which monthly totals cannot do.
  • Read rows for one cohort over time, columns for cohorts at the same age, and diagonals for calendar effects such as a November sale.
  • Compare cohorts per customer and in gross profit, so cohort size and first-order discounts do not distort the result.
  • A cohort is worth acquiring when its cumulative gross profit per customer passes its CAC within a time you can accept.

Cohort analysis in ecommerce groups customers by the month of their first order and follows what each group buys in the months after. It shows whether the customers you win today come back and spend as much as the customers you won before. A monthly revenue total cannot show that, because it mixes new and returning customers of every age.

This guide explains how to build an acquisition cohort table, how to read retention and cumulative gross profit per customer, which mistakes distort the picture, and what ROASaurus shows.

What is a cohort analysis?

A cohort is a group of customers who share a starting point. In ecommerce, the usual starting point is the first order. Everyone who first bought in March is the March cohort, whatever channel they came from.

A cohort table has one row per cohort and one column per period since the first order. M0 is the month of the first order, M1 is the month after it, and so on. Each cell answers one question for one group at one age: how many customers came back, how much they spent, or how much gross profit they left.

This layout compares customers of the same age. The March cohort in its third month can be compared with the June cohort in its third month, even though those months fall in different seasons.

Shopify has a built-in customer cohort analysis report that groups customers by their first order in the same way. Its metrics are customer counts, retention and sales. To see cohorts in gross profit, you also need the costs of every order: product cost, shipping, payment fees and handling.

How to build a cohort table

  1. Collect paid orders with a customer identity

    Every order needs a customer id or an email address. Without one, you cannot link a second order to the first. Leave out cancelled and unpaid orders.

  2. Find each customer's first order

    The month of that order is the customer's cohort.

  3. Give every order an age

    Count the months between the cohort month and the month of the order: 0 for the first month, 1 for the next, and so on.

  4. Add up per cohort and age

    Sum the orders, revenue and gross profit in each cell, and count the customers who ordered.

  5. Divide by the cohort size

    Divide by the number of customers in the cohort, so cohorts of different sizes can be compared.

  6. Choose per period or cumulative

    A per-period cell shows that month only. A cumulative cell adds up every month so far, which is what you compare with acquisition cost.

Google Analytics offers a similar choice in its cohort exploration, with standard, rolling and cumulative calculations. Standard counts each period on its own, and cumulative adds up the periods so far. For webshop cohorts, use per-period cells for retention and cumulative cells for value.

How to read a cohort table

Here is a retention table for an example store, seen at the start of January. Each cell shows the share of the cohort that ordered again in that month.

First orderCustomersM1M2M3M4M5
July1,0008%6%5%9%7%
August9008%6%10%7%–
September1,1007%11%7%––
October1,05012%8%–––
November2,4005%––––
Illustrative numbers. Read a row to follow one cohort, a column to compare cohorts at the same age, and a diagonal to see one calendar month. The November diagonal (9%, 10%, 11%, 12%) shows the sale lifting every older cohort.

Read the rows

A row follows one cohort over time. In this example, the July cohort orders again at 8% in its first month. The rate falls to 5% by its third month, then jumps to 9% in November.

Read the columns

A column compares cohorts at the same age. In M1, October did best at 12% and November worst at 5%. But the M1 of the October cohort was November, the sale month. So part of that 12% comes from the sale, not from the cohort.

Read the diagonals

A diagonal is one calendar month across all cohorts. The November diagonal reads 9%, 10%, 11% and 12%: every older cohort bought more in November. When a diagonal stands out, the cause is something that happened in that month, such as a sale, a product launch or a delivery problem. It says nothing about the quality of the cohorts.

The November cohort itself is the real question. It is more than twice the size of the others, but only 5% of it came back in December. In the same month, every other cohort came back at 7% or 8%.

Cumulative revenue and gross profit per customer

Retention tells you whether customers come back. Cumulative value per customer tells you what they are worth. Add up everything a cohort bought from its first order onward and divide by the number of customers in the cohort. Do it in gross profit, not only in revenue, because gross profit is what pays back the cost of acquiring the customer.

Example store: cumulative gross profit per customer
March cohort (full price)November cohort (20% off)CAC of both cohorts
$50$0
M0M1M2M3M4M5M6
Illustrative numbers. The March cohort covered its $30 CAC with the first order. The November cohort, acquired at a discount, is still below $30 after six months.

Behind the two lines: the March cohort's first orders averaged $70 at a 48% gross margin rate, so they left $33.60 per customer. The November cohort's first orders would have been $80 at full price, at the same 48% gross margin rate. After a 20% discount they averaged $64, but their costs stayed at $41.60. The gross margin rate fell to 35%, and each first order left $22.40. The discount cut the margin on the first order, and fewer of those customers came back.

A cohort is worth acquiring when its cumulative gross profit per customer passes its CAC within a time you can accept. The month where that happens is the payback period. For the March cohort, it is M0. For the November cohort, it has not happened yet. How to set that limit is covered in customer lifetime value for Shopify stores, and the margin itself is explained in contribution margin in ecommerce.

Common cohort analysis mistakes

Mixing cohort sizes

A cohort of 150 customers and a cohort of 2,400 do not deserve the same weight. When you average cohorts, weight each one by its number of customers. Treat small cohorts with care: in a cohort of 150, three customers who each spend $200 more move the average by $4.

The opposite mistake is to compare cohort totals. The November cohort has the most revenue in total only because it has the most customers. Compare cohorts per customer.

Reading young cohorts as worse

A cohort that started last month has had one month to buy. Compare it only with older cohorts at the same age. The last cell of a row can also be the current month, which is not over yet, so it looks low until the month ends.

Ignoring seasonality

Cohorts acquired in a sale month, such as November, behave differently from cohorts acquired at full price. Compare them with the same month a year earlier, not with the month before. And check the diagonals before you blame a cohort: if every cohort had a weak month at the same time, the cause is the calendar.

Ignoring first-order discounts

A discount on the first order brings in customers at a lower margin, and some of them came for the discount rather than for the product. Split cohorts by the discount code on the first order and compare their gross profit per customer.

Losing customers who check out as guests

If a returning customer checks out with a different email address, they look like a new customer. Their second order starts a new cohort instead of counting as a repeat order. Repeat rates then come out too low and new-customer counts too high. Encourage customer accounts, and read repeat rates as a lower limit.

How to act on a cohort analysis

  • Set what you can pay for a customer. Read the cumulative gross profit per customer at the payback time you accept, for example 6 months. That is your maximum CAC.
  • Move budget to cohorts that repeat. Split cohorts by first product, discount code or first ad channel, and put more budget behind the groups that keep buying.
  • Time your follow-up emails. If most second orders come in the second month, send the reminder before that, not after.
  • Fix the first-order offer. If discounted cohorts never catch up, test a smaller discount or another offer, and compare the new cohorts after three months.
  • Use payback to judge first-order losses. A cohort that pays back in M2 can justify campaigns below their first-order break-even ROAS. A cohort that never pays back cannot.

Cohort analysis in ROASaurus

The cohort report in ROASaurus lifetime value is built from your orders and the product costs in profit analytics. Customers are identified by Shopify customer id or email, and only paid orders count.

  • Cohorts by the week, month, quarter or year of the first order, as a matrix or as curves, with CSV export.
  • 14 metrics, among them Customers returning (%), Cumulative orders per customer, Cumulative revenue per customer and Cumulative contribution margin per customer. That last metric takes off product costs, shipping, order fees, payment fees, handling and pass-through tax, and it is before ad spend. It is the one that matches gross profit per customer as this guide uses the term. The report also has a Cumulative gross profit per customer metric, but it keeps the tax you collected in, unless Taxes collected is set to Left out of revenue under Profit › Cost settings.
  • Each row shows the number of customers, CAC, R% (the share with a second order so far) and the average first order. CAC is the ad spend in the cohort's period divided by every new customer acquired in it.
  • The average row weights per-customer metrics by the number of customers in each cohort.
  • A green outline marks the period in which a cohort's cumulative margin per customer passed its CAC: the payback period.
  • For monthly cohorts, striped cells show predicted values up to 24 months, from your store's own repeat curve.
  • Filters on the first order: first product, product type, vendor, discount code, country, first ad channel, sales channel, UTM source, medium or campaign, customer tag or order tag.
  • Repurchase rates per first-order month within 30, 60, 90, 180 and 365 days. A window that has not passed for every customer in the cohort is marked with an asterisk.

Ask AI can answer questions about your cohorts too. It reads the monthly cohorts, the cumulative contribution margin per customer and the CAC payback month for you.

Sources

  1. Shopify Help Center: Customers reports
  2. Google Analytics Help: [GA4] Cohort exploration

In ROASaurus

Keep reading

Profit and metricsBreak-even ROAS: the minimum ROAS your ads needBreak-even ROAS is the ROAS at which ads pay for themselves. Learn the formula, work through examples and set a target ROAS for each product line.Profit and metricsContribution margin in ecommerce: CM1, CM2, CM3 explainedContribution margin in ecommerce explained: CM1, CM2 and CM3, a worked example from revenue to net profit, and which profit layer fits which decision.Profit and metricsMER vs ROAS: which number should you steer on?MER vs ROAS: MER divides total revenue by total ad spend, ROAS looks at one channel. See when to use each, a worked example and how to find break-even MER.
FAQ

Questions, answered

What is cohort analysis in ecommerce?

It groups customers by the month of their first order and tracks what each group buys afterwards. It shows retention and value per customer at the same age for every group, which a monthly revenue total cannot show.

Which metric should a cohort table show?

Start with the share of customers who order again and with cumulative gross profit per customer. Retention shows whether customers come back. Cumulative gross profit shows whether they paid back what it cost to acquire them.

Should I use monthly or weekly cohorts?

Monthly cohorts are the usual choice, because each cohort is larger and the numbers are more stable. Use weekly cohorts when customers reorder within days, or when you want to see the effect of a short campaign.

How many customers does a cohort need?

There is no fixed minimum, but the smaller the cohort, the more one customer moves the average. Merge small months into quarters, or read them with care. ROASaurus, for example, only trusts a month of its prediction curve when at least 20 customers are old enough for it.

Why do my recent cohorts look worse?

Recent cohorts have had less time to buy, and the current month is not over yet. Compare cohorts only at the same age, and wait for a full period before you judge one.

Every sale, traced to the ad that earned it

Server-side tracking, profit and lifetime value in one app. 14-day free trial, no credit card.

Start your free trial →