Course contentsShow
← Data Science
Lesson 1655 of 2,14540. Customer and Product AnalyticsFree lesson

Constructing Retention Tables

Build retention tables from user-level event data by calculating cohort sizes and return rates for each time period.

Constructing Retention Tables

You'll learn: How to build retention tables from raw event data by grouping users into cohorts and calculating their return rates period by period.

What Is a Retention Table?

A retention table is a grid that shows what percentage of users from each cohort returned in each subsequent time period. Each row represents a cohort (grouped by their start date), and each column represents a time period after that start (Day 0, Day 1, Day 7, etc.).

Think of it like tracking graduates from different years: the Class of 2020 might have 80% attend the first reunion, 60% the second, and so on. Each graduating class (cohort) gets its own row.

Building the Table: Step by Step

1. Define Your Cohorts
Group users by their cohort start event date (e.g., sign-up date, first purchase).

2. Calculate Cohort Size
Count how many users belong to each cohort. This is your denominator.

3. Count Returns by Period
For each cohort, count how many unique users had activity in Period 1, Period 2, etc. after their start event.

4. Calculate Retention Rates
Divide the returning user count by the original cohort size:

Retention Rate = (Users Active in Period N) / (Cohort Size) × 100%

5. Arrange in a Grid
Rows = cohorts (by start date), Columns = periods since start (0, 1, 2, 3…). Period 0 is always 100% by definition.

The Power of the Table

Retention tables let you spot patterns instantly: Are newer cohorts stickier? Does retention flatten after Week 4? Is there a seasonal pattern? This visual format transforms millions of event records into actionable insight.

Key Takeaway: Retention tables aggregate user-level event data into a cohort-by-period grid, calculating what fraction of each cohort returned in each time window—turning raw logs into retention insight.