Sub topic 1
What a Cohort Is and Why Retention Matters for Fit
Prerequisites
This chapter assumes you already know the basics of product metrics such as active users and churn. You should be comfortable reading tables and line charts. The code is optional. If you run it, you need basic Python and pandas.
What a cohort is
A cohort is a group of users who share a starting point. The most common starting point is the period in which a user first used the product. Everyone whose first event happened in January 2026 belongs to the January 2026 cohort.
Cohorts matter because totals hide what is happening. A product can show rising monthly active users while every group of new users leaves quickly. Growth in signups covers up the loss. Looking at each group separately, from the day it started, removes that effect.
Two ideas make a cohort useful:
- Cohort date: the period of a user's first event. Each user belongs to exactly one cohort.
- Age: the number of periods since the cohort date. Age 0 is the month the user started. Age 1 is the next month.
Measuring by age lets you line up cohorts that started at different times and compare them fairly.
Why retention matters for fit
Product-market fit means a product satisfies a real need for a definable group of people. The most direct evidence is that people who try the product keep coming back without being pushed. Retention measures exactly that: of the users who started, what share is still active at each later age.
Other metrics can look good without fit. Signups can come from ad spend. Revenue can come from one large deal. Retention is harder to fake. Users return only if the product keeps being useful to them.
A first look at the data
The example below builds a small retention table. It assigns each user to the month of their first event, counts the distinct users active at each age, and divides by the cohort size at age 0.
import numpy as np
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")
events["cohort"] = events.groupby("user_id")["month"].transform("min")
events["age"] = (
(events["month"].dt.year - events["cohort"].dt.year) * 12
+ (events["month"].dt.month - events["cohort"].dt.month)
)
active = (
events.groupby(["cohort", "age"])["user_id"]
.nunique()
.unstack(fill_value=0)
)
retention = active.div(active[0], axis=0)
print(retention.round(2))Here is how to read the result:
- Each row is a cohort. The January cohort has users 1 and 2. The February cohort has users 3 and 4. The March cohort has user 5.
- Each column is an age. Column 0 is always 1.00, because every user is active in their first month.
- A value in column 1 is the share of that cohort active one month later. The January cohort shows 1.00 at age 1, because both users returned in February.
Some cells will show 0.00, such as the February cohort at age 2. Treat those with care. A 0.00 may mean users left, or it may mean that period has not happened yet. A later chapter covers this pitfall in detail.
What to look for
At this stage you are only learning to see the structure. Later chapters teach how to read the shape. For now, keep three questions in mind:
- Does retention drop and then level off, or does it keep falling?
- Are newer cohorts retaining better than older ones?
- Is the activity you count a real sign of value, or just a login?
Exercise
A product's total monthly active users grow every month, yet a founder worries about fit. Why might cohorts reveal a problem that the total hides, and what does "age" let you do when comparing cohorts?
Show answer
Growth in new signups can offset the loss of earlier users, so the total rises even when each cohort leaves quickly. Cohorts track each group from its own start. Age is the number of periods since a user's first event, so cohorts that started in different months can be compared at the same point in their lives, such as one month after starting.