Sub topic 11
Retention curves: N-day, unbounded, and bracket retention
This chapter assumes you can read a cohort retention table, as built in the cohort analysis chapter. You should know that a cohort is a group of users who share a start date, and that retention is the share of that cohort who do a core action later. You also need basic SQL (SELECT, JOIN, GROUP BY) and some PostgreSQL date arithmetic.
A retention curve plots retention against time since signup. Three common definitions of "retained on day N" produce three differently shaped curves from the same data. Choosing the wrong one can make a healthy product look weak, or a weak one look healthy.
What a retention curve shows
Each point on the curve answers one question: of the users in the cohort, what share counted as retained at time N? The x-axis is time since signup, in days or weeks. The y-axis is a percentage from 0 to 100.
Every definition fixes three things, as in the earlier chapter on precise metric definitions:
- Population: the cohort, for example everyone who signed up in January 2026.
- Event: the core action that counts as "came back". Any login or background ping would inflate the number.
- Window: the day or range of days after signup in which the event must occur.
The three retention types differ only in the window.
The three definitions
| Type | A user is retained at N if they... | Typical use |
|---|---|---|
| N-day (classic) | performed the core action on exactly day N after signup | Products used daily, such as messaging or games |
| Unbounded | performed the core action on day N or any later day | Products with irregular use, such as travel or tax tools |
| Bracket | performed the core action within a range, such as days N to N+6 | Products used weekly, such as fitness or team tools |
N-day retention
Day 0 is the signup day. Day 7 retention counts users active on the seventh day after signup, and nothing else. A user active on days 6 and 8 but not on day 7 is not counted.
This is the strictest definition. The curve drops sharply in the first days and usually flattens. It is sensitive to weekday effects: a business tool's cohort that signs up on Friday has its day 7 on a Friday, but its day 8 and 9 land on a weekend.
Unbounded retention
A user counts as retained at day N if they were active on day N or later, up to the end of the data. The curve can never rise as N grows. A user who returns on day 40 counts as retained at every earlier point.
It is more forgiving than N-day retention, and it suits products where gaps are normal. It has a cost: the most recent cohorts have had less time to return, so they look worse. Unbounded values for old and new cohorts are not comparable unless you cap the observation period.
Bracket retention
A user counts as retained in a bracket if they were active at least once inside the range, for example days 7 to 13. Brackets usually tile the timeline without overlap: days 1 to 7, 8 to 14, and so on.
Bracket retention smooths daily noise and fits products with a natural weekly or monthly rhythm. The cost is a coarser curve. The bracket width is a definition choice, so state it every time you report the number.
The values are illustrative. The unbounded line is always at or above the N-day line, because every user active exactly on day N is also active on day N or later.
Computing all three in SQL
The query below uses PostgreSQL, with users(user_id, signup_at) and events(user_id, event_name, event_time). For each N it reports N-day retention, unbounded retention, and 7-day bracket retention (days N to N+6) for January 2026 signups.
-- Retention at days 7, 14 and 28 for the January 2026 signup cohort
-- Assumes event data is complete through 2026-02-28 (as_of is exclusive)
WITH params AS (
SELECT DATE '2026-03-01' AS as_of
),
cohort AS (
SELECT user_id, signup_at::date AS signup_day
FROM users
WHERE signup_at >= DATE '2026-01-01'
AND signup_at < DATE '2026-02-01'
),
activity AS (
SELECT DISTINCT e.user_id,
e.event_time::date - c.signup_day AS day_offset
FROM events e
JOIN cohort c ON c.user_id = e.user_id
WHERE e.event_name = 'core_action'
AND e.event_time::date >= c.signup_day
),
points AS (
SELECT * FROM (VALUES (7), (14), (28)) AS p(n)
)
SELECT
p.n AS day_n,
COUNT(*) AS eligible_users,
COUNT(*) FILTER (WHERE EXISTS (
SELECT 1 FROM activity a
WHERE a.user_id = c.user_id AND a.day_offset = p.n
)) * 1.0 / COUNT(*) AS n_day_retention,
COUNT(*) FILTER (WHERE EXISTS (
SELECT 1 FROM activity a
WHERE a.user_id = c.user_id AND a.day_offset >= p.n
)) * 1.0 / COUNT(*) AS unbounded_retention,
COUNT(*) FILTER (WHERE EXISTS (
SELECT 1 FROM activity a
WHERE a.user_id = c.user_id
AND a.day_offset BETWEEN p.n AND p.n + 6
)) * 1.0 / COUNT(*) AS bracket_retention
FROM cohort c
CROSS JOIN points p
CROSS JOIN params
WHERE c.signup_day + p.n + 6 < params.as_of
GROUP BY p.n
ORDER BY p.n;Three details matter:
- Calendar days.
day_offsetsubtracts dates, so day 1 means the next calendar day, not 24 hours later. A user who signs up at 23:50 and returns at 00:10 counts as day 1. Some tools use rolling 24-hour windows instead. Write down which one you use. - Distinct activity.
SELECT DISTINCTcollapses repeated events on one day, so one user is counted once per day. - Eligibility filter. The
WHEREclause keeps only users whose full bracket has already elapsed. Without it, recent signups sit in the denominator with no chance of having returned, which drags the number down.
Choosing the right type
Match the definition to the natural usage rhythm of the product.
- Estimate how often a healthy user performs the core action: daily, weekly, or occasionally.
- If healthy users come back daily, use N-day retention. Gaps are a warning sign.
- If healthy users come back weekly or monthly, use bracket retention with a bracket as wide as the rhythm. Day 7 retention would punish users who simply come on day 6 or 8.
- If use is irregular, as with a tool people open only when a need arises, use unbounded retention. Cap the observation period when comparing cohorts of different ages.
Reading the curve
The shape of the curve says more than any single point.
- Flattening. The curve falls, then levels off at a non-zero value. That plateau is the share of users who found lasting value. It is the healthiest sign.
- Declining to zero. The curve keeps falling with no plateau. Every cohort eventually leaves, so growth requires constant new acquisition.
- Smile. The curve dips and then rises. Under N-day retention this can happen when users return after reminders or seasonal events. Under unbounded retention a rise is impossible, so a rising line there means a bug in the query.
- Sawtooth. Regular spikes every seven days under N-day retention reflect a weekly habit. Switch to bracket retention to see the underlying level.
Improvements show up in newer cohorts. Overlay the curves of several cohorts. If a product change helped, later cohorts sit above earlier ones from the first days on. Compare cohorts at the same age, never at the same calendar date.
Common errors
- Using any event. Counting logins, emails opened, or background syncs inflates retention. Use the core action.
- Including immature users. Users who have not yet reached day N lower the result. Filter them out, as the query does.
- Mixing day 0. Some tools treat the signup day as day 1. Check the offset convention before comparing.
- Averaging across cohorts of different sizes. Weight by cohort size, or report cohorts separately.
- Switching definitions mid-report. A move from N-day to bracket retention looks like an improvement when nothing changed.
Exercise
A cohort has 1,000 users, all old enough for the window to be complete. 220 users performed the core action on day 7 exactly. 310 performed it at least once on days 7 to 13. 480 performed it on day 7 or any later day. Compute the day 7 N-day, 7-day bracket, and unbounded retention. Then say which one fits a weekly planning app.
Show answer
N-day is 220 / 1,000 = 22%. Bracket (days 7 to 13) is 310 / 1,000 = 31%. Unbounded is 480 / 1,000 = 48%. The ordering N-day ≤ bracket ≤ unbounded always holds, because each definition includes the users of the previous one. A weekly planning app should use bracket retention, since users who plan on day 6 or 8 are still healthy and exact-day retention would undercount them.
Exercise
A teammate reports that unbounded retention at day 14 rose from 35% for last month's cohort to 38% for this month's cohort, measured today. Why might this comparison be misleading, and what is the fix?
Show answer
The cohorts have different ages. The older cohort has had more time for users to return, so it should look better under unbounded retention. If it still looks worse, the true improvement may be larger. The mismatch also works the other way for other metrics. The fix is to cap the observation window for both cohorts, for example only counting activity through day 28 after each user's own signup, and to include only users whose window has fully elapsed.