Lenny’s Newsletter · Free post · Metrics, data & experimentation · Growth & retention

How to measure cohort retention

A deep dive into the formulas, visualizations, and SQL you need to accurately measure and report on cohort retention—a guest post by Olga Berezovsky

Lenny RachitskyAug 30, 202218 min♥ 172
SourceLenny’s Newsletter
KindFree post
PublishedAug 30, 2022
Readers♥ 172
Originallennysnewsletter.com ↗
N:

Olga Berezovsky, guest-writing for Lenny Rachitsky, argues that cohort retention is widely misunderstood and costly to get wrong, and offers a practical guide to measuring it. She recommends defining "active" by the core user action rather than noisy events like logins or visits, separating free users from paying customers, and choosing between X-day and unbounded retention based on how users behave. She covers the tradeoffs of product analytics tools versus SQL, outlines a step-by-step approach to building retention tables, and explains how to visualize cohorts. The piece closes by warning that retention is an output metric, not a good target for short-term experiments.

01Key takeaways

  • Define 'active' using your core user action rather than logins or app opens to get clean, consistent data.
  • Report free and paying users separately, since blended retention masks the real behavior of free users.
  • Pick X-day retention for regularly used or subscription products, and unbounded retention for irregular, long-term engagement.
  • Build a clean activity table first, then derive retention from it in SQL using defined buckets and cohort dates.
  • Visualize retention as cohort tables with a color scale, and segment cohorts by behavior to find what drives stickiness.
  • Treat retention as an output metric; avoid using it as the sole goal for short-term experiments.

02Key sections

Define what 'active' means
Retention depends on how activity is defined, and most teams default to logins or app opens. The author prefers the main user action because it filters out noise and is consistent across platforms.
Separate users from customers
Free users and paying customers behave differently, so blended retention hides the real activity of free users. Segment the two groups and report them separately.
Choose X-day or unbounded retention
X-day retention measures return on a specific day and is conservative, while unbounded retention counts return on that day or later. The right choice depends on usage frequency and whether the product is SaaS or consumer.
Tools versus SQL
Product analytics tools offer quick retention reports but often lack payment data and default to N-day logic. SQL gives precise control but requires building a clean activity table and a sequence of transformation steps.
Visualize with cohorts
Cohort charts with color scales reveal behavior patterns better than line charts, and segmenting cohorts by behavior helps find power users. Retention should be monitored as an output metric rather than used as a primary A/B test goal.

03From the post

“1. All the ways to grow your product 2. How to kickstart and scale a consumer business—Step 5: Finding product-market fit 3. Kickstarting and scaling a consumer business—Step 6: Building your growth engine Subscribe to get access to these posts, and every post. Q: You talk about retention a lot, but how do I actually measure retention? Specifically, cohort retention. I haven’t found any great guides out there. I was also shocked to find that there wasn’t a great post out there on how to accurately and concretely measure cohort retention. Considering how important it is to all things product and growth—and how costly it is to get it wrong—this is a big gap. So let’s fix it. To help us out, I’ve tapped Olga Berezovsky, author of the wonderful Data Analysis Journal newsletter, to get deep into the weeds of retention. Below, she shares the formulas, SQL queries, tools, and templates you need to measure, visualize, and report on retention. I’ve never seen this level of detail and guidance before, and I’m excited to share it here. Thank you,…”

“retention is both the most important and the least understood metric at most companies”Olga Berezovsky · Lenny’s Newsletter
“Often a mistake I see SaaS companies make is reporting one "blended" retention, with a mix of free and paid users.”Olga Berezovsky · Lenny’s Newsletter

04Frameworks mentioned

Summary and takeaways written by PM Atlas; quotes are short excerpts. © the original author.