my-appengineer Courses

Cohort basics: repeat purchase and retention over time

Understanding behaviour: cohorts, heatmaps and researchLesson18 min12 / 22

Monthly totals can lie. Your revenue can grow every month while each new group of customers is less loyal than the one before, and you will only notice when growth suddenly stalls. Cohort analysis shows what totals hide. This lesson teaches you to build and read a simple cohort table, by hand if needed.

What a cohort is

A cohort is a group of customers who share a starting moment: first purchase in March, sign-up in week 12, joined the course in the spring launch. You then follow each group over time and measure the same thing for all of them: did they buy again, are they still subscribed, did they finish the course?

Because every group is measured from its own start, you compare like with like. A customer who bought last week cannot have bought twice in 90 days yet; a cohort table takes that into account automatically.

A shop example: Paws & Co repeat purchase

Paws & Co sells beds, but also chews, shampoo and toys that people re-order. The question: what share of new customers buys again, and how fast?

The cohort table, by month of first purchase, shows the cumulative share of customers who placed a second order:

First order inNew customersWithin 30 daysWithin 60 daysWithin 90 days
March2006.0% (12)10.0% (20)13.0% (26)
April1804.4% (8)7.8% (14)10.0% (18)
May2106.2% (13)11.0% (23)14.3% (30)
June2307.0% (16)12.2% (28)(not yet)
July1906.8% (13)(not yet)

How to read it:

  • Read across a row to see how one cohort develops. March customers keep coming back slowly: 6% in month one, 13% by day 90.
  • Read down a column to compare cohorts at the same age. At 90 days: 13%, 10%, 14.3%. April is weaker.
  • The empty cells are not zero; those cohorts are simply not old enough yet.

What happened in April? The owner checks her change log: in April, a large share of new customers came from a 25%-off promotion on beds. Discount buyers bought once and did not return. That is useful knowledge: promotions brought customers with lower lifetime value, which should be taken into account in what she pays to acquire them.

Watch out

Small cohorts are noisy. 18 versus 26 repeat buyers could partly be chance. Treat a single weak cohort as a question to investigate, and look for a pattern across several cohorts before you change strategy.

Why it matters in money

Repeat purchase changes what a customer is worth. Suppose Paws & Co earns €20 contribution margin on a first order and €15 on each repeat order, and a customer places on average 0.25 repeat orders in the first year:

First-year contribution per customer = €20 + 0.25 × €15 = €23.75

If a loyalty push raises that to 0.40 repeat orders: €20 + 0.40 × €15 = €26.00. That €2.25 extra per customer is room to spend more on acquisition, or extra profit. The course Customer service, reviews and retention goes deeper into loyalty.

A SaaS example: Bookwise retention

For a subscription, the cohort question is: what share of a month's new paying customers is still paying N months later?

Started paying inCustomersMonth 1Month 2Month 3Month 6
January5092%86%82%74%
February5691%84%80%(not yet)
March6095%91%88%

The March cohort retains noticeably better. Bookwise launched an improved onboarding in March that helps salons import their client list on day one. Better activation shows up as better retention, two months later. This is exactly why SaaS teams track activation as a leading indicator. For churn, MRR and LTV formulas, see the course Subscriptions: onboarding, retention and SaaS metrics.

A course example: GreenThumb Academy completion

For a course, retention means progress. GreenThumb follows each launch cohort:

LaunchStudentsFinished module 1Finished module 3Finished course
Spring8479%48%31%
Autumn10285%61%44%

The autumn cohort got weekly live Q&A sessions. Completion matters because students who finish leave reviews, buy the next course and refer friends.

How to build a cohort table

Option 1: in your analytics tool. GA4 has a Cohort exploration in Explore, based on first visit or first event, with retention by day, week or month. Useful, but it only knows about consented, measured visitors, and it identifies users by device or browser unless you set a user ID.

Option 2: from your own records (recommended for repeat purchase). Your order list is complete and identifies customers by customer number. Steps:

  1. Export orders with: order date, customer ID (an internal number, not an email), order value excl. VAT.
  2. For each customer, find the date of the first order. That month is their cohort.
  3. For each later order, calculate the number of days since the first order.
  4. Count, per cohort, how many customers had a second order within 30, 60 and 90 days.
  5. Divide by the cohort size.

A spreadsheet with a pivot table does this in half an hour. Claude can do it in minutes from an export.

Ask Claude
I am pasting an export of my orders with columns: order_date, customer_id, value_excl_vat. [paste or attach CSV]. Build a monthly cohort table by month of first order. For each cohort show: number of new customers, and the cumulative percentage with a second order within 30, 60 and 90 days. Leave cells empty where the cohort is not old enough yet. Then calculate the average number of repeat orders in the first 90 days per cohort, point out the strongest and weakest cohort, and remind me which differences are too small to trust. Do not include any customer IDs in your answer.

If your shop runs on the platform, Claude can read order data through the shop connector when your connection has the order scope; customer details need a separate scope. Only grant what you need, and keep customer data out of anything you share.

How it works in your country

Order exports contain personal data. Under the GDPR you must keep them secure, only use them for purposes your privacy notice covers, and delete exports you no longer need. Check your regulator's guidance on using customer data for analysis, for example the Autoriteit Persoonsgegevens in the Netherlands, UODO in Poland, the CNIL in France or the ICO in the UK. Strip names and emails before you paste anything into any tool.

What to do with cohort insights

  • Weak early retention (few second orders within 30 days, or high month-1 churn): look at the first experience. Delivery, product quality, onboarding, the first email after purchase.
  • A cohort that stands out: check your change log. Which channel, offer or product drove that cohort?
  • A steady decline across cohorts: your newer customers come from less suitable channels or offers. Check your acquisition mix.
Your task

Build one cohort table for your business: repeat purchase (shop), paying retention (SaaS) or progress (course). If you have fewer than three months of data or fewer than 50 customers per cohort, build it anyway with what you have and write down what you will look at once the data grows. Note your most important observation in your measurement plan.

This course is general information, not personal legal, tax or financial advice. Rules, amounts and dates change: check the official source for your country before you act.