Sub topic 3
Classic, bracket, and rolling retention
This chapter assumes you know what a cohort is and have chosen an activity event and a time unit, as covered in the earlier chapters. It also assumes you can read basic pandas. Here you will learn the three standard ways to turn "did this user come back?" into a number. Each one gives a different number for the same users, so you need to know which one you are looking at.
One question, three answers
Every retention number answers a question of this form: of the users who started in a given period, what share did something that counts as "still here" at a given later point?
The definitions differ in what "at a given later point" means. Take a user who signed up on day 0. We want to know whether they are retained at N = 7.
- Classic (N-day) retention asks whether the user was active on exactly day N.
- Bracket retention asks whether the user was active at any time inside a window that starts at day N and has a fixed width, for example days 7 to 13.
- Rolling retention (also called unbounded retention) asks whether the user was active on day N or on any later day.
For one set of users, the three numbers always satisfy classic ≤ bracket ≤ rolling. The window grows at each step, and a larger window can only add users.
Classic retention
Classic retention counts a user as retained only if they were active on exactly day N. Day 1, day 7, and day 30 are the usual choices.
- It is simple to explain and widely used for consumer apps, so it is easy to compare with published numbers.
- It is strict. A user who skipped day 7 but came back on day 8 counts as lost.
- It is noisy for products used less than daily. The day-7 number depends on which weekday the user signed up, because a user whose habit is "Monday" will show up on day 7 only if they signed up on a Monday.
- It can rise and fall from one N to the next. Day 6 can be lower than day 7 if your product has a weekly rhythm. This is real behavior, not an error.
Bracket retention
Bracket retention counts a user as retained if they were active at least once inside a window, such as days 7 to 13 ("week 2"). The window is usually one natural usage period: a day, a week, or a month. Monthly cohort tables built on "active in month k" are bracket retention with a calendar-month window.
- It matches products whose natural usage cycle is longer than a day, because a single visit in the window is enough.
- It smooths weekday effects when the window is at least one week wide.
- Choosing the width is a judgment call, and a wider window gives a higher number. State the width every time you quote a figure.
Rolling retention
Rolling retention counts a user as retained if they were active on day N or at any point after it.
- It answers "how many users have not fully churned by day N?" and so reads as an upper bound on active usage.
- It can never increase as N grows, because the set of users with activity at or after day N can only shrink.
- It flatters the product. A user who came back once on day 40 and never again counts as retained at day 7, day 14, and day 30.
- It depends on how long you have watched. A cohort observed for 200 days has had more chances to show a late return than one observed for 20 days.
Worked example
The following script computes all three definitions at N = 7 for five users. Bracket width is 7 days (days 7 to 13). It only includes users whose full window has already elapsed, so nobody is penalized for days that have not happened yet.
import pandas as pd
events = pd.DataFrame({
"user_id": [1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5],
"ts": pd.to_datetime([
"2026-01-01", "2026-01-02", "2026-01-20",
"2026-01-01", "2026-01-10",
"2026-01-02", "2026-01-05", "2026-01-09",
"2026-01-03",
"2026-01-04", "2026-01-11", "2026-01-12",
]),
})
N = 7
WIDTH = 7 # bracket covers days N .. N + WIDTH - 1
first = events.groupby("user_id")["ts"].min().dt.normalize()
events["day"] = (
events["ts"].dt.normalize() - events["user_id"].map(first)
).dt.days
# Keep only users whose whole bracket window has already elapsed.
cutoff = events["ts"].max().normalize()
window_end = first + pd.Timedelta(days=N + WIDTH - 1)
eligible = first[window_end <= cutoff].index
e = events[events["user_id"].isin(eligible)]
size = len(eligible)
classic = e.loc[e["day"] == N, "user_id"].nunique()
bracket = e.loc[e["day"].between(N, N + WIDTH - 1), "user_id"].nunique()
rolling = e.loc[e["day"] >= N, "user_id"].nunique()
print(f"cohort size: {size}")
print(f"classic day {N}: {classic}/{size} = {classic / size:.0%}")
print(f"bracket days {N}-{N + WIDTH - 1}: {bracket}/{size} = {bracket / size:.0%}")
print(f"rolling day {N}+: {rolling}/{size} = {rolling / size:.0%}")The output is:
cohort size: 5
classic day 7: 2/5 = 40%
bracket days 7-13: 3/5 = 60%
rolling day 7+: 4/5 = 80%Here is where each number comes from:
| User | Active on days | Classic (day 7) | Bracket (days 7-13) | Rolling (day 7+) |
|---|---|---|---|---|
| 1 | 0, 1, 19 | no | no | yes |
| 2 | 0, 9 | no | yes | yes |
| 3 | 0, 3, 7 | yes | yes | yes |
| 4 | 0 | no | no | no |
| 5 | 0, 7, 8 | yes | yes | yes |
The same five users produce 40%, 60%, and 80%. None of the numbers is wrong. They answer different questions, so a report that says only "7-day retention is 60%" is incomplete.
User 1 shows the difference most clearly. They were absent for the whole of week 2 and returned only on day 19. Rolling retention counts them as retained at day 7. Classic and bracket do not.
Choosing a definition
Match the definition to how often the product is meant to be used and to the decision you are making.
| Situation | Better choice | Reason |
|---|---|---|
| Daily-use consumer app, early habit check | Classic day 1, 7, 30 | Day-specific return is the signal, and it matches common benchmarks |
| Weekly or monthly product (planning, billing, reporting) | Bracket with a window equal to the usage cycle | A single visit per cycle is healthy usage |
| Asking how many users are still potentially alive | Rolling | It tolerates gaps and measures avoided churn |
| Judging product-market fit from a cohort table | Bracket or classic, with the window written on the chart | They show decay and flattening honestly |
Rolling retention suits questions about the size of the "not yet churned" pool. For judging product-market fit it is the weakest of the three, because it cannot show decay. Its curve starts high and falls slowly even for a product people try once and abandon.
Edge cases and common errors
Incomplete windows
A user who signed up 10 days ago cannot yet have a day-14 value. If you count them as "not retained", you understate retention for your newest cohorts, and the newest cohort looks like it got worse. Filter to users whose window has fully elapsed, as the script does, or mark those cells as not yet observed. The pitfalls chapter returns to this.
For rolling retention the issue is subtler. A user always has a chance to be counted as retained until the observation ends, so the number for a young cohort is biased down, and the number for an old cohort keeps drifting up as late returns arrive. Fix a common cutoff when you compare cohorts, for example "any activity on day 7 through day 60".
Anchoring the day count
Day 0 can be the signup timestamp, the first activity event, or the first value-delivering action. Pick one and keep it. The script above anchors on the first event, which makes day 0 active by definition. If you anchor on signup, some users never become active at all, and your day-0 retention is below 100%. That is a legitimate and sometimes useful number, but it is not the same table.
Time zones and day boundaries
A day offset of exactly 7 assumes you have normalized timestamps to one time zone before taking the date. A user in the evening in one time zone can land on a different calendar date in UTC. Normalize first, and use the same rule for every cohort.
Counting events instead of users
Retention counts distinct users. Use nunique on the user ID, as in the script. Counting rows would give a user with five events on day 7 five times the weight.
Comparing classic and bracket on the same chart
Mixing them on one axis produces misleading gaps. If you need both, show them as separate lines with labels that include the window, for example "classic D7" and "bracket D7-13".
Exercises
Exercise
A weekly planning tool starts a cohort of 200 users. 60 were active on exactly day 7. 90 were active at least once on days 7 to 13. 130 were active on day 7 or any later day. Compute classic, bracket, and rolling retention at N = 7, and say which one you would report for judging fit. Give one reason.
Show answer
Classic is 60/200 = 30%. Bracket is 90/200 = 45%. Rolling is 130/200 = 65%. Report bracket with a 7-day window. A weekly tool is meant to be used once per week, so a visit on any day of week 2 is healthy usage, and classic would penalize users whose habit falls on another weekday. Rolling would hide decay because a late single return counts as retained.
Exercise
Two cohorts are compared on rolling day-7 retention. Cohort A signed up 180 days ago and shows 55%. Cohort B signed up 20 days ago and shows 40%. A teammate concludes the product got worse. Why is this conclusion not supported, and what would you do instead?
Show answer
Rolling retention counts any activity from day 7 onward, so cohort A has had 180 days to collect late returns and cohort B only 20. The gap may come from the different observation lengths and not from product quality. Fix a common cutoff for both cohorts, for example "any activity from day 7 through day 20", or switch to classic or bracket retention at a fixed N and window, and compare only users whose windows have fully elapsed.