By El Ghali Bennis · Published
Customer Cohort Analysis Ecommerce: How to Build and Read It
Learn customer cohort analysis for ecommerce: build a retention table in Excel or Sheets, read the heatmap, and fix the reasons shoppers don't return.

Customer cohort analysis in ecommerce groups shoppers by when they first bought, then tracks how many of them come back to buy again over the following weeks or months. It shows whether your store retains customers or just keeps acquiring new ones, which blended revenue numbers hide completely.
Most store owners watch total revenue and conversion rate. Both can climb while your business quietly gets weaker. If every new customer buys once and disappears, you're running on a treadmill: ad costs rise, and growth depends on spending more each month. Cohort retention analysis is how you see that before it hurts.
This guide walks through what cohorts are, how to calculate the numbers, how to build the table in a spreadsheet, how to read the chart, and what to do when the picture looks bad. The examples are illustrative figures, not data from a real store, so swap in your own numbers as you go.
What is customer cohort analysis in ecommerce?
A cohort is a group of customers who share a starting event, usually their first order in a given month. Cohort analysis follows each group over time and compares them side by side, so you can tell whether customers acquired in March behave differently from those acquired in September.
The reason it matters: averages lie. Say your overall repeat rate is 28%. That might be a store where older customers are loyal at 40% and recent ones are at 12% because you've been buying cheap traffic. The blended number hides the decline. A cohort view exposes it.
Acquisition cohorts vs. behavioral cohorts
The standard version is the acquisition cohort: customers grouped by first-purchase month. Start there. Once it's working, you can build behavioral cohorts, which group people by what they did, such as customers whose first order included a specific product, used a discount code, or came from Meta ads versus email.
Behavioral cohorts answer sharper questions. Do people who buy your starter kit reorder more than those who buy the bestseller? Do discount-code customers ever come back at full price? Those answers change how you spend money.
The ecommerce customer retention metrics to know
- Repeat purchase rate: the share of customers who have placed two or more orders.
- Customer retention rate: the share of customers from a period who buy again in a later period.
- Time to second order: median days between first and second purchase. It tells you when to send reminders.
- Revenue retention: how much money a cohort generates in each period relative to its first month.
- Cumulative revenue per customer: the running total that feeds customer lifetime value.
How to calculate customer retention rate in a cohort
There are two versions of the formula, and it helps to know which is which. The general business formula is: retention rate = (customers at end of period − new customers acquired in the period) ÷ customers at start of period × 100. It measures a whole customer base over one period.
For cohort work, use the simpler version, which is the one every table in this guide uses: cohort retention rate = customers from the cohort who bought in month N ÷ customers in the cohort at month 0 × 100.
Here's a worked example with illustrative numbers. In January, 400 customers placed their first order. In February, 48 of them ordered again. In March, 36 did. In April, 30 did.
| Month | Returning customers from January cohort | Retention rate |
|---|---|---|
| Month 0 (January) | 400 | 100% |
| Month 1 (February) | 48 | 12% |
| Month 2 (March) | 36 | 9% |
| Month 3 (April) | 30 | 7.5% |
Each rate is returning customers divided by the original 400. Note that a customer who buys in both February and April counts in both months. Month 0 is always 100% because it's the cohort's defining purchase.
What a finished retention heatmap looks like
Once you stack several cohorts, the table becomes a heatmap. Here is a sample with illustrative numbers. In a spreadsheet, the darker cells would be the higher percentages.
| Cohort | Customers | Month 0 | Month 1 | Month 2 | Month 3 | Month 4 |
|---|---|---|---|---|---|---|
| January | 400 | 100% | 12.0% | 9.0% | 7.5% | 7.0% |
| February | 360 | 100% | 11.5% | 8.5% | 7.0% | 6.5% |
| March | 520 | 100% | 8.0% | 5.5% | 4.5% | |
| April | 610 | 100% | 6.5% | 4.0% | ||
| May | 580 | 100% | 6.0% |
The triangle shape is normal: newer cohorts haven't had time to reach later months. What stands out is the month-1 column sliding from 12% to 6% as cohort size grew. That pattern usually means a new, lower-intent traffic source or heavier discounting started in March.
What is a good repeat purchase rate benchmark?
Published benchmarks vary widely by category, source, and how "repeat" is defined, so treat these as rough working ranges rather than hard standards. They are directional estimates that I could not tie to a single study, so confirm them against a current source for your vertical:
- Consumables (coffee, supplements, pet food): roughly 30% to 45% of customers reorder within a year.
- Beauty and skincare: roughly 25% to 40%.
- Apparel and accessories: roughly 20% to 30%.
- Home goods and décor: roughly 15% to 25%.
- Furniture, mattresses, and large electronics: often under 10%.
A frequently repeated rule of thumb is that repeat customers are a minority of a typical store's customer base, often cited at 20% to 30%, yet generate a disproportionate share of revenue. To verify numbers for your category and time window, see Shopify's guide to customer retention, the retention metrics explained in Klaviyo's customer retention rate guide, and retail data on Statista.
The better benchmark is your own history. If your January cohort retained 12% at month one and your June cohort retains 7%, something changed, and that's worth more than any industry average.
How to run cohort analysis in Excel or Google Sheets
You don't need a paid analytics tool to start. A store with a few thousand orders can build a working cohort table in an afternoon using cohort analysis in Excel or cohort analysis in Google Sheets. The steps are nearly identical in both.
Step 1: Export your orders
Pull a CSV of every order with three columns: customer email (or ID), order date, and order total. Include at least 12 months if you can. Remove cancelled and fully refunded orders, or your retention will look better than it is.
Step 2: Find each customer's first order month
Add a column called cohort_month. In Excel or Sheets, the simplest approach is to sort by customer and date, then use a lookup that returns the earliest date per customer, for example =MINIFS(date_range, email_range, A2). Format the result as year and month. That's the customer's cohort.
Step 3: Calculate months since first order
Add a second column, months_since, equal to the difference in months between the order date and the cohort month. A first order has a value of 0. A purchase three months later has a value of 3. A formula like =DATEDIF(cohort_month, order_date, "m") works in both tools.
Step 4: Build the pivot table
Create a pivot table with cohort_month as rows, months_since as columns, and a distinct count of customers as values. In Excel, add the data to the Data Model to enable distinct count. In Google Sheets, use a COUNTUNIQUE formula inside a query, or a pivot with a helper column that flags each customer's first order in each period.
Step 5: Convert counts to percentages
Divide every cell by the month-0 count in its row. Now each row is a cohort and each column is a month, with values showing the share of customers who came back. Apply a color scale (conditional formatting) and you have a retention heatmap like the sample above.
If you also sum order totals instead of counting customers, you get revenue retention, which feeds directly into how you calculate customer lifetime value.
How to read a customer cohort retention chart
Read the table in three directions: down the columns, across the rows, and along the diagonal. Each direction answers a different question about your store.
Across a row: the retention curve
One row is one cohort's life. Retention should drop sharply after month 0, then flatten. The flattening point matters most. If a cohort drops to 8% and holds there, you've got a loyal core. If it keeps sliding toward zero, nobody is building a habit with your brand.
Down a column: are newer cohorts better or worse?
Compare the month-1 column from top to bottom. Colors getting lighter as you go down means your recent customers are less engaged than earlier ones. Common culprits: heavier discounting, a new ad channel bringing low-intent buyers, or a product or shipping quality problem.
Along the diagonal: calendar events
Cells that sit on the same calendar month across different cohorts share the same outside conditions. If every cohort dips in the same month, look for a site outage, a stock problem, or a seasonal pattern. If every cohort spikes, that's probably a promotion or email campaign.
A cohort analysis example
Here is a hypothetical scenario to show the method in action. Picture a store selling specialty tea. Its heatmap shows the spring cohort retaining 14% at month two and the autumn cohort at 6%. Digging in, the owner finds that autumn customers mostly arrived through a 40%-off Black Friday-style promotion, while spring customers bought at full price from a sampler pack. The fix isn't to stop promotions. It's to follow every discount buyer with a post-purchase sequence that nudges them toward the sampler and a subscription.
Why customers don't come back to your store
When retention is low, the cause is usually one of five things. Cohort data helps you tell which one.
- The product doesn't need replacing. Retention will be low by nature. Your lever is cross-selling complementary items, not reminders.
- The first experience disappoints. Late delivery, damaged packaging, or products that look different from the photos. Check whether reviews and support tickets cluster in the weak cohorts. Our guide on reducing customer support tickets covers the common causes.
- Nobody follows up. If you don't send a post-purchase email, a replenishment reminder, or a win-back message, you're relying on customers to remember you.
- You acquired the wrong buyers. Deep-discount and giveaway traffic tends to produce one-time deal hunters. Compare cohorts by acquisition channel to confirm.
- There's no reason to return. No loyalty points, no wishlist reminders, no new arrivals worth a second look.
Time to second order is the clue that makes these actionable. If your median repeat buyer returns at day 38, a reminder at day 30 is well-timed. A reminder at day 7 is just noise.
Turning cohort insights into revenue
Once you've got the table, use it to make three decisions: how much you can afford to spend on acquisition, which customers deserve more attention, and which retention tactics to try first.
Use customer lifetime value by cohort
Add up cumulative revenue per customer for each cohort at months 3, 6, and 12. That's customer lifetime value by cohort, and it's far more honest than one blended LTV number. If your January cohort has produced $92 per customer by month six and it cost $30 to acquire them, you know exactly how much room you have to scale ads. If a newer cohort is tracking at $48, you know to slow down.
Run one retention experiment per cohort
Change one thing, then watch the next cohort against the previous one. Examples:
- Add an abandoned-cart and post-purchase email flow.
- Launch a points-based loyalty program for second orders.
- Collect reviews after delivery to build trust for repeat buyers. See how to get more customer reviews for tactics.
- Offer a subscription for consumable products, as outlined in our subscription ecommerce guide.
Because cohorts are time-stamped, you get a clean before-and-after read without a formal A/B test. It isn't perfectly scientific, but it's good enough to keep or kill a tactic within two or three months.
Common mistakes to avoid
- Cohorts that are too small. Under about 100 customers per cohort, the percentages bounce around. Use quarterly cohorts instead of monthly.
- Judging recent cohorts too early. A cohort from last month hasn't had time to repurchase. Compare like for like: month 1 against month 1.
- Counting guest checkouts as new customers. The same person using different emails splits your data. Encourage accounts to keep identities clean.
- Ignoring refunds. Returned orders inflate retention and LTV.
Skip the spreadsheet maintenance in your cohort analysis
A manual cohort table is a great way to learn the method, but exporting and rebuilding it every month gets old fast. If you'd rather have retention views, abandoned-cart recovery, loyalty, reviews, and email automations already wired into your store, Rovela includes them by default in a flat subscription, so the data and the tools that act on it live in one place. You can check the pricing page to see what's included.
Start simple. Build one acquisition cohort table this week, find your month-1 retention, and note your time to second order. Then pick one reason from the list above and test a fix on your next cohort. Within a quarter, you'll know whether your store is building a customer base or just renting attention.
