Cohort Analysis
Intermediate 14 min read Cohort Analysis

Retention Cohorts

The matrix that answers 'do users come back' with colors instead of arguments

The retention cohort matrix has cohorts in rows, periods-since-entry in columns, and percent-active cells. Reading it diagnosizes product health better than any single number.

retention matrixD0period retentionretention curvevintage
Before we start

What you will learn

  • Build a period retention matrix from raw events
  • Draw the correct conclusion from cohort-row shapes and column trends
  • Debate what counts as 'active' and keep it comparable
In 60 seconds

In a retention matrix, each cell is 'percent of a cohort active in period k since entry' (usually period 0 = 100% by definition). Rows show the lifecycle; columns show vintage trend.

Introduction

What is this?

A retention cohort matrix is a table where rows are acquisition cohorts (e.g. signup months), columns are periods-since-entry (Month 0, 1, 2, …), and cells hold the percentage of the cohort that was active in that period. Month 0 is usually 100% by definition (everyone who signed up was active that month). Reading down a column shows whether newer cohorts are more retentive than older ones; reading across a row shows how the cohort's engagement naturally decays.

Motivation

Why do you need it?

  • A single aggregate retention number can't tell 'new users worse' from 'everyone decays faster' — the matrix separates them.
  • It makes product launches checkable: release in July, July's row should flatten sooner.
  • Row shapes reveal the decay curve (fast attrition vs mild slope) suggesting different fixes.
  • Columns surface seasonal effects while reducing calendar noise per cohort.
Think about it

Mental model

Imagine

A school's class attendance sheet

Think of

The retention matrix

Each year's intake has its own attendance trend; the headmaster compares 'same grade, different years' to spot whether this year's class is drifting from school earlier. Rows are classes, columns are grade levels.

Mechanics

How it works

  • Select the entry event, the active-event definition, and the period (day/week/month).
  • Compute for each cohort and each period k the share unique-active / cohort_size (k=0 → 100%).
  • Present as a matrix and/or plotted row-by-row as retention curves.
  • Compare row shapes and column trends; benchmark decay curve against category norms.
  • Drill into underperforming cohorts to distinguish product regressions from acquisition quality issues.

Layout of the standard retention matrix.

Rows = cohorts
Columns = periods
Cells
Read rows
Read columns
Real world

In production

  • A job board sees its M0→M1 column drop 20 points for cohorts starting in April when a competitor launched — a market event caught in the matrix.
  • A productivity app's June cohort (post-onboarding-redesign) flattens its decay curve: 12% higher M3 retention than May's row — the change is validated.
  • A content site uses the matrix as its weekly health check, paging the product lead when any recent cohort dips below its 90-day band.
Guidelines

Best practices

  • Define 'active' exactly (event list + dedupe key) and freeze it for matrix comparability.
  • Show cohort counts alongside percentages so thin cohorts don't mislead.
  • Use period length deliberately: daily for sticky consumer apps, weekly/monthly for B2B.
  • Benchmark the row shape, not just M1: the flattening point (knee) is where retention stabilizes.
Watch out

Common mistakes

  • Filling M0 with all signups including users who never actually started using — M0 should be 'active in their first period', often ~signup-or-worse.
  • Comparing cohorts with different period lengths.
  • Including perpetually-bounded cells (like M3 of a 2-month-old cohort) in trend reads.
  • Switching the active definition mid-period and 'discovering' a product win that's actually a metric change.
When things break

Debugging tips

  • A dropped cohort row appearing across ALL cohorts means an active-definition change, not a cohort problem.
  • Check cohort sizes before diagnosing shape; a 30-user cohort row has huge sampling noise.
  • Reconcile with the raw events table by hand-recomputing one cell for a known cohort.
  • Holidays and internal launches must be annotated on the matrix; otherwise analysts can't reconstruct why a vintage deviated.
Interviews

Interview checkpoint

Practice

Hands-on lab

Build a Cohort Retention Matrix in Pandas
35 min · intermediate
In progress
Objectives
  • Generate a realistic signup-and-session event dataset
  • Tag users with signup-month cohorts
  • Compute and pivot a cohort retention matrix
  • Read the matrix for trend and decay conclusions

Build a Cohort Retention Matrix in Pandas

35 min · intermediate

0/5 steps
0%
sandbox · Linux sandbox
$
Try these commands
Test yourself

Quick quiz

0/2
1

In a retention matrix, the value at (Cohort=January, Column=M1) is:

2

Reading down a matrix column compares cohorts at the same age.

Go deeper

Official documentation