Sub topic 2
Choosing what counts as active and the right time unit
Every retention number depends on two choices made before any calculation: what counts as "active", and how long a period lasts. This chapter covers both. It assumes you know what a cohort is (a group of users who started in the same period) and that you are comfortable with basic product metrics such as active users and churn.
Why the definition matters
Retention asks whether a user came back. "Came back" has no meaning until you say what the user did and within what window. Two teams measuring the same product can report 60% and 15% retention because they chose different definitions, and neither is wrong.
A bad definition produces a misleading curve. If "active" means "opened the app", a user who taps a push notification and leaves counts as retained. That inflates retention and hides a product that delivers no value.
Choosing the active event
The active event is the action that shows a user received the product's core value. Use these tests:
- It reflects value, not presence. Prefer "sent a message" over "logged in". Prefer "ran a report" over "visited the dashboard".
- It is something the user chooses to do. Avoid events triggered by the system, such as receiving an email or being sent a notification.
- It happens at a natural frequency. The event should be one a satisfied user would repeat within your chosen time unit.
- It is recorded reliably. Check for missing or duplicated events before you build on it.
| Product | Weak active event | Stronger active event |
|---|---|---|
| Messaging app | Opened the app | Sent a message |
| Project tool | Logged in | Created or edited a task |
| Marketplace | Viewed a listing | Placed an order or replied to a buyer |
| Analytics SaaS | Visited the dashboard | Ran or shared a report |
Keep the start event separate from the active event. The start event (often signup or first use) assigns a user to a cohort. The active event decides whether that user counts in later periods. The first event in the earlier example's code plays both roles for simplicity, but in practice they often differ.
Choosing the time unit
The time unit is the length of one period: day, week, or month. Choose it from how often a satisfied user would naturally use the product.
- Daily suits products used every day, such as messaging or games.
- Weekly suits products tied to a work or habit rhythm, such as a team tool or a fitness app.
- Monthly suits products used less often, such as invoicing, tax, or travel tools.
A unit that is too short makes healthy users look churned. A monthly accounting tool measured daily will show near-zero retention even when every customer is happy. A unit that is too long hides decay. A chat app measured monthly can look stable while users quietly drop from daily to once-a-month use.
How the unit shows up in code
In the cohort table from the worked example, the unit is set in one line. The code groups timestamps into calendar months:
import pandas as pd
ts = pd.Series(pd.to_datetime(["2026-01-05", "2026-01-29", "2026-02-02"]))
monthly = ts.dt.to_period("M")
weekly = ts.dt.to_period("W")
print(pd.DataFrame({"ts": ts, "month": monthly, "week": weekly}))Changing "M" to "W" or "D" changes the whole table. The age calculation must change with it. Subtracting years and months only works for monthly periods, so for weekly or daily data you subtract period values directly.
Calendar periods have a side effect. A user who starts on January 31 and returns on February 1 shows age 1, though only one day passed. A user who starts on January 1 and returns on January 30 shows age 0. If this matters, use periods measured from each user's own start date, as in classic (N-day) retention, which the next chapter covers.
A worked decision
Suppose you run a meal-planning app. Users plan meals on weekends and shop once a week.
- Active event: "saved a meal plan", not "opened the app". Opening is common after a notification and says little about value.
- Time unit: weekly. Daily would mark most happy users as inactive on five days out of seven. Monthly would hide users who plan for two weeks and then stop.
With those choices, "week 4 retention" means: of users who started in a given week, the share who saved a plan in the fourth week after.
Exercise
A tax-filing product measures retention with "opened the app" as the active event and a weekly time unit. Retention falls to near zero after week 1, and the team concludes the product has no fit. Name two problems with the definition and propose a better one.
Show answer
First, "opened the app" is weak evidence of value, and it is also not what a satisfied tax user does. Second, a weekly unit does not match the usage pattern, since most people file once a year, so almost every user looks churned after the first week. A better definition would use a value event such as "submitted a return" or "uploaded a document", measured over a longer unit such as monthly or per filing season. For a product this infrequent, compare returning users across years instead.