Sub topic 1
What a Cohort Is and Why Retention Matters for Fit
Prerequisites
This chapter assumes you have:
- Basic familiarity with product metrics such as active users, signups, and churn.
- Comfort reading tables and line charts.
- Optionally, basic Python and pandas. The one code example is short, and you can follow the chapter without running it.
You do not need any statistics beyond averages and percentages.
Why this chapter comes first
Founders usually ask whether they have product-market fit (PMF). PMF means a product satisfies a real need for a definable group of people, strongly enough that they keep using it and pay for it. No single number proves it. Retention is the closest thing to a direct measurement, though.
Signups, page views, and press coverage can all be bought or borrowed. Retention can't. Users have to choose to return, with no ad or discount pulling them back. If people who tried the product keep coming back, the product is doing a job for them. If they don't, growth is a leaky bucket, and spending on acquisition only fills it faster.
The tool for reading retention properly is the cohort. This chapter defines the cohort, explains why it beats a blended average, and sets out what the rest of the tutorial builds on it.
What a cohort is
A cohort is a group of users who share a starting condition, tracked together over time. The most common starting condition is the time of first use, so a cohort is usually "everyone who signed up in January" or "everyone who ran their first query in the week of March 3."
Each person belongs to exactly one cohort, and you follow that group forward through the same periods of age:
- Age 0 is the period in which the cohort started.
- Age 1 is the next period, and so on.
Aligning cohorts by age rather than by calendar date lets you ask a clean question: "Of the people who started together, how many were still around N periods later?"
Cohorts can also be defined by something other than start date. Examples are acquisition channel, pricing plan, or the first feature a user touched. This tutorial calls those segments and returns to them in a later chapter. For now, "cohort" means a group defined by when users started.
Why not just track total active users?
A blended number such as "monthly active users" mixes people of very different ages. Suppose monthly active users rise from 10,000 to 12,000. That could mean either of these:
- Existing users are staying and new users are adding on top. This is healthy.
- A big marketing push brought in 8,000 new users while 6,000 older users quietly left. This is a problem hidden by growth.
The totals are identical in both stories. A cohort view separates them, because it tracks each starting group on its own and shows whether the older groups are holding.
| Question | Blended active users | Cohort view |
|---|---|---|
| Are we growing? | Yes, shows the total | Yes, via cohort sizes |
| Do users stay? | Hidden | Shown directly per cohort |
| Is the product improving? | Hidden by new signups | Compare newer cohorts to older ones |
| Where does decay stop? | Cannot tell | Visible in the curve shape |
Why retention signals fit
Retention is the share of a cohort that is still active after some time. Later chapters define "active" and the main ways to calculate the share. For this chapter, the idea is enough.
Retention matters for fit for three reasons.
- It measures repeated value, not first impressions. A curious user can sign up once for almost any product. Coming back in week 4 means the product earned a place in their routine.
- It is hard to fake. Paid acquisition inflates signups and early activity. After the novelty fades, retention reflects whether the product holds up on its own.
- It shapes the economics. If a cohort's retention eventually levels off, the people who remain generate value indefinitely, and acquisition cost can be recovered. If it keeps falling toward zero, every user is eventually lost, and the business must acquire users forever just to stand still.
The third point is why the shape of the retention curve matters more than any one number. A product that keeps 40% of users at month 1 but only 3% at month 12 is in a different situation from one that keeps 25% at month 1 and 22% at month 12. The second product has found a group it fits. The first has not, whatever its early numbers suggest. Later chapters in this tutorial cover this distinction between a plateau and continued decay in detail.
Forming cohorts from event data
Every cohort analysis starts from an event log, with one row per user action. The minimal columns are a user identifier and a timestamp. To assign cohorts, find each user's first event and bucket it into a period.
import pandas as pd
events = pd.DataFrame({
"user_id": [1, 1, 1, 2, 2, 3, 3, 4, 5, 5],
"ts": pd.to_datetime([
"2026-01-05", "2026-02-10", "2026-03-03",
"2026-01-20", "2026-02-15",
"2026-02-02", "2026-03-12",
"2026-02-18",
"2026-03-05", "2026-03-20",
]),
})
events["month"] = events["ts"].dt.to_period("M")
# Each user's cohort is the month of their first event.
cohort_of_user = events.groupby("user_id")["month"].min().rename("cohort")
# Cohort size: how many distinct users started in each month.
sizes = cohort_of_user.value_counts().sort_index()
print(sizes)Here users 1 and 2 start in January, users 3 and 4 in February, and user 5 in March. The cohort sizes are therefore 2, 2, and 1.
The cohort assignment follows these rules:
- A user's cohort never changes once assigned. It is a fixed label based on their first event.
- You count distinct users, not events. A user with ten events still counts once.
- Cohort size is the denominator for every retention percentage in that row. A later chapter turns this into the full retention table.
Choices that shape every cohort
Three decisions affect all later results, so make them deliberately and write them down.
The starting event
"First event" is easy to compute but may be the wrong anchor. A user who opens an app once and leaves is a different case from one who completes onboarding. Common anchors are:
- Account creation, which is simple but includes many people who never engaged.
- First meaningful action, such as sending a message, creating a project, or placing an order.
- First payment, which is useful for subscription products but ignores free users.
A stricter anchor gives higher retention numbers and a smaller denominator. Neither is wrong, but you must not compare numbers across different anchors.
The period size
Cohorts are bucketed by day, week, or month. Choose a bucket that matches how often the product is meant to be used. A daily messaging app suits day or week buckets. An annual tax tool doesn't suit either. The next chapter covers this choice together with the definition of "active."
The observation window
A cohort from last week has not had time to show month-3 behaviour. Younger cohorts have fewer observed ages than older ones. This leads to a common misreading, treating missing future periods as zero retention, which later chapters cover under pitfalls.
What cohorts can and cannot tell you
Cohorts describe what happened to a group. They don't explain why. A retention table can show that the March cohort retained worse than February's, but not whether the cause was a new acquisition channel, a product change, or a seasonal effect. Explaining the difference requires segmenting, which later chapters cover, and often talking to users.
Cohort tables are also backward-looking. They show behaviour of people who already joined, under the conditions at the time. A product that fit last year's early adopters may not fit the mainstream users who arrive next. Treat a good curve as evidence about the group measured, not a guarantee about the next group.
A first look at the full picture
The rest of this tutorial builds up in layers. Each layer answers a question the previous one raises:
- What counts as active, and over what time unit?
- How is retention defined: classic, bracket, or rolling?
- How do you build the table and read the curve?
- Does the curve flatten, or keep decaying?
- Are newer cohorts better than older ones?
- What can mislead you, and which segments does the product fit?
- How do revenue retention and other signals support or contradict the picture?
Each of these feeds the final judgment. No step is decisive alone. The skill is combining them into a cautious, evidence-based conclusion about whether the product fits a market.
Summary
- A cohort is a group of users who share a starting condition, usually the period of their first use, tracked together by age.
- Blended totals hide whether users stay. Cohorts separate new arrivals from retained users.
- Retention indicates fit because it measures repeated, voluntary use that is hard to inflate.
- The shape of a retention curve matters more than any single point on it.
- Your choices of starting event, period size, and observation window shape every result, so record them and keep them consistent.
- Cohorts show what happened, not why, and they describe past users rather than future ones.
Exercise
A startup reports that monthly active users grew from 5,000 to 7,000 in one quarter. In the same quarter it acquired 6,000 new users. What does this suggest about retention, and which cohort analysis would you run to confirm it?
Show answer
If the user base grew by only 2,000 while 6,000 new users arrived, about 4,000 earlier users must have become inactive (assuming all new users counted as active). This suggests poor retention hidden by acquisition. To confirm, group users by the month they first appeared and compare how many of each cohort are still active at later ages. If older cohorts show steep losses with no flattening, the product has not yet found fit with those users.
Exercise
Why must you count distinct users rather than events when computing cohort sizes? Using the event log in the code example, what is the January cohort's size?
Show answer
Counting events would give more weight to heavy users, so a user with ten events would count ten times and the cohort size would be wrong. Retention is a statement about people, so the denominator must count each person once. In the example, users 1 and 2 have their first event in January 2026, so the January cohort size is 2, even though those two users logged five events across the period.
Exercise
Two teams measure retention for the same app. Team A anchors cohorts on account creation. Team B anchors them on the first completed order. Team B reports higher retention. Does that show Team B's product is better?
Show answer
No. Team B's anchor excludes users who signed up but never ordered, so its cohorts only contain people who already showed intent. That raises retention and shrinks the denominator. The two numbers answer different questions and can't be compared directly. To compare them fairly, both teams should use the same starting event.