Cohort Analysis in Marketing
Why averages lie
If you look at a blended retention number — 'our 30-day retention is 22%' — you're averaging together users who signed up in January with users who signed up last week. If your product or acquisition channel changed in between, that blended number tells you nothing about whether things are getting better or worse. It's a snapshot that hides a trend.
Cohort analysis fixes this by grouping users into buckets based on a shared starting point — most commonly their signup date or first-purchase date — and then tracking each bucket's behavior separately over time. Instead of one retention number, you get a grid of retention numbers, one per cohort, and the pattern across cohorts is where the real signal lives.
Defining a cohort
A cohort is just 'everyone who shares event X in time window Y.' The most common cohort key is acquisition date (signup week, install day), but you can cohort by anything that marks a meaningful starting point: first purchase, first campaign touch, plan tier at signup, or acquisition channel. The choice of cohort key determines what question you can answer — acquisition-date cohorts answer 'is our product/onboarding getting better over time,' while channel cohorts answer 'which acquisition source produces users who stick around.'
Once the cohort is defined, you pick a recurring behavior to measure against it — usually 'came back and did X' — and track the percentage of the original cohort still doing that at increasing time intervals (day 1, day 7, day 30, day 90).
The cohort grid is a triangle, not a rectangle
Cohort Day 0 Day 1 Day 7 Day 30 Day 90
Jan signups 100% 38% 19% 11% 8%
Feb signups 100% 41% 22% 14% 10%
Mar signups 100% 45% 27% 18% - (not enough elapsed time yet)
Apr signups 100% 44% 29% - -
Reading this: each row is a retention CURVE, not a single number.
Compare curves row-to-row at the SAME day-offset column to see
whether retention is improving release over release.Reading the curve shape, not just the numbers
A retention curve almost always drops steeply in the first few days and then flattens into a long, slow decline — this flattening point is often called the 'retention floor' or 'smile point,' and it roughly estimates your long-run active-user base as a percentage of signups. Two products can have wildly different day-1 retention but converge to similar floors, or have similar day-1 numbers but diverge badly by day-30 — the shape tells a different story than any single number.
When comparing cohorts, align them by days-since-start, not by calendar date. Comparing 'January's day-30 number' to 'March's day-7 number' because that's 'today's date' for both is a common analytical error — always compare the same lifecycle stage.
Cohort type and the question it answers
| Cohort key | Question it answers | Common pitfall |
|---|---|---|
| Signup/acquisition date | Is onboarding or product quality trending up or down over time? | Confounded by seasonality (e.g. holiday signups behave differently) |
| Acquisition channel | Which channel brings users who actually stick? | Small channels have noisy, low-sample cohorts |
| First purchase date | Is customer lifetime value trending with product changes? | Ignores users who never convert at all |
| Plan tier at signup | Does a pricing tier predict long-term retention? | Confuses causation — higher tiers may just be more committed buyers already |
Building a cohort table in SQL
Most cohort tables are built from two pieces: a cohort assignment (first event date per user) and a recurring activity log, joined on user ID with a date-difference calculation. Here's the typical shape of that query against an event warehouse:
WITH first_seen AS (
SELECT user_id, MIN(DATE(event_timestamp)) AS cohort_date
FROM events
WHERE event_name = 'sign_up'
GROUP BY user_id
),
activity AS (
SELECT user_id, DATE(event_timestamp) AS active_date
FROM events
WHERE event_name = 'session_start'
)
SELECT
f.cohort_date,
DATE_DIFF(a.active_date, f.cohort_date, DAY) AS days_since_signup,
COUNT(DISTINCT a.user_id) AS active_users
FROM first_seen f
JOIN activity a USING (user_id)
GROUP BY 1, 2
ORDER BY 1, 2Small cohorts produce noisy curves
Using cohorts to evaluate marketing decisions
Cohort analysis is most powerful when you tie a cohort boundary to a specific change: a redesigned onboarding flow, a new paid channel, a pricing change. By comparing the retention curve of cohorts acquired before and after the change, you isolate its effect far more cleanly than a single before/after average metric would, because you're comparing like-for-like lifecycle stages rather than blending different points in users' lifecycles together.
This is also how you catch a channel that looks good on last-click conversion volume but produces cohorts that churn fast — a problem a single acquisition report would never surface.
What's next
Cohort analysis tells you whether users stick around after a starting event. The companion question — where users drop off between steps on the way to that starting event — is covered next.
Next: Funnel Analysis & Drop-off Diagnosis →
I build these systems professionally.
Whether it's a RAG pipeline, analytics migration, or AI workflow — let's talk.