Picture a bucket with a hole in it. You pour water in from the top, and the level rises. Pour faster, and it rises faster. From across the room, it looks like a bucket filling up nicely.
What you can’t see from across the room is the water running out of the bottom.
Most founders track their business with exactly that view: one line for total customers, one for monthly revenue. Here is a fictional software company, Rotawise, that I’ll use for the whole post. Its total paying customers for the first half of the year:
| Month | Jan | Feb | Mar | Apr | May | Jun |
|---|---|---|---|---|---|---|
| Paying customers | 40 | 93 | 104 | 129 | 165 | 193 |
| Monthly revenue | $980 | $2,310 | $2,530 | $3,540 | $4,380 | $5,240 |
Up and to the right. Revenue more than five times higher in six months.
Now the number the chart doesn’t show: 300 customers signed up in those six months, and 107 of them had already left. More than a third of the water is gone, and the line still points up, because new signups hide the leak.
A cohort retention table is how you look at the bottom of the bucket. It’s the chart I trust most when someone says their startup is working, because it’s hard to fake with a busy month of marketing.
Why total charts hide churn
Churn is customers leaving. A total-customers chart shows new customers minus lost customers, added up over time. As long as you add more than you lose, the line rises, no matter how many you lose.
That causes three problems:
- Growth hides churn. Rotawise’s March added 45 new customers and lost 34 who had paid in February. The chart shows “+11.” The 34 disappear.
- Old and new customers get mixed. Your total in June contains customers from January who are very loyal, and customers from last week who haven’t decided yet. One number averages them into mush.
- You can’t see whether things are getting better. If you fixed onboarding in April, did it work? The total line can’t tell you, because April’s customers are blended with everyone else.
The fix is to stop looking at everyone together and look at groups of customers who started at the same time, then follow each group as it ages.
What a cohort is
A cohort is a group of customers who started in the same period. Usually the same month. Everyone who first paid in January 2025 is the January cohort. Everyone who first paid in February is the February cohort.
Cohort retention is the share of a cohort still active some number of months after they started.
Retention in month N = cohort members still active in month N / cohort members in month 0
Month 0 is the month they started. Month 1 is one month later, and so on. This is called the lifetime month or age: months since joining, not the calendar month.
That distinction is the whole trick. “Month 3” means “three months after this group joined,” whatever the calendar says, so January’s and April’s customers can be compared fairly at the same age.
In “16 Startup Metrics,” a 2015 guide from the venture firm Andreessen Horowitz (a16z), the authors describe the same layout: month 1 set to 100% of the starting group, and later months shown as the share of that group still transacting. That is the cohort table.
Build one step by step
You only need a list with one row per customer per month they were active. Three columns:
| customer | month | mrr |
|---|---|---|
| 1 | 2025-01 | 20 |
| 1 | 2025-02 | 20 |
| 2 | 2025-01 | 20 |
| 2 | 2025-02 | 20 |
MRR means monthly recurring revenue: what that customer paid that month. If your billing tool exports invoices or subscriptions, you can usually get to this shape.
Then four steps:
- Find each customer’s cohort: the earliest month they appear.
- Find each row’s age: months between the cohort month and this row’s month.
- Count active customers per cohort per age. That’s a grid: cohorts down the side, ages across the top.
- Divide each row by its own month-0 number. Now every row starts at 100%.
User retention vs revenue retention
You can fill the grid with two kinds of numbers, and they answer different questions.
User retention counts people: of the customers who started in January, what share are still paying?
Revenue retention counts money: of the revenue the January cohort brought in month 0, what share is still coming in? This one has two versions.
Net revenue retention (NRR) includes everything that happened to that group’s revenue: customers leaving (churn), customers moving to a cheaper plan (contraction, or downgrades), and customers paying more (expansion, or upgrades).
NRR = (starting MRR + expansion - contraction - churned MRR) / starting MRR
Gross revenue retention (GRR) is the stricter version. It counts the losses but ignores the upgrades.
GRR = (starting MRR - contraction - churned MRR) / starting MRR
Both only include customers who were already in the group at the start. New customers never count, or the number would mix retention with sales.
Because GRR leaves out upgrades, it can never be above 100%. NRR can, if your remaining customers grow their spending faster than others leave. In a cohort table, net revenue retention above 100% means a group of customers is paying you more now than when they started, even though some of them left.
Why track both? NRR tells you if the group as a whole is growing. GRR tells you how much is leaking. A strong upgrade path can make NRR look great while GRR shows a real leak underneath, which is the same warning the a16z guide gives about net churn understating losses.
Hands-on: Rotawise’s cohort table in Python
Rotawise is a made-up company with made-up data, built to show the method. It sells a staff-scheduling app. Basic is $20 a month, Pro is $50 a month.
I generated six monthly cohorts of customers, January to June 2025, and followed them through December 2025. The data comes from a short script with a fixed random seed, so it’s the same every time you run it. Rotawise also signed customers after June, but this table follows only the first six cohorts.
The story I built into the data, so you can see it come out the other end:
- January and March: normal months. About 30% of customers stick for good; the rest leave at 25% a month.
- February: most customers came from a one-off listing on a deals website. None of them stick.
- April onward: Rotawise ships a new onboarding checklist. More customers stick.
- Plan changes: 1 in 5 customers start on Pro. Some loyal customers switch plans in their fourth month (month 3): Basic upgrades to Pro, Pro downgrades to Basic.
Here’s the generator:
import random
import pandas as pd
# Fictional "Rotawise": staff-scheduling app. Basic $20/month, Pro $50/month.
# (start month, new customers, share who stay for good, monthly churn of the rest)
COHORTS = [
("2025-01", 40, 0.30, 0.25),
("2025-02", 60, 0.00, 0.45), # mostly from one deals-site listing
("2025-03", 45, 0.30, 0.25),
("2025-04", 50, 0.50, 0.20), # new onboarding checklist ships
("2025-05", 55, 0.55, 0.20),
("2025-06", 50, 0.60, 0.20),
]
LAST = pd.Period("2025-12", "M") # last month of data
rng = random.Random(12) # fixed seed: same data every run
rows, cid = [], 0
for start, n, stay_share, churn in COHORTS:
start = pd.Period(start, "M")
for _ in range(n):
cid += 1
stays = rng.random() < stay_share
plan = 50 if rng.random() < 0.2 else 20 # 1 in 5 start on Pro
moves = stays and rng.random() < 0.3 # switch plan in month 3
month = start
while month <= LAST:
age = (month - start).n
mrr = plan
if moves and age >= 3:
mrr = 20 if plan == 50 else 50
rows.append({"customer": cid, "month": str(month), "mrr": mrr})
if not stays and rng.random() < churn:
break
month += 1
pd.DataFrame(rows).to_csv("payments.csv", index=False)
That writes 1,661 rows, one per customer per paid month. Now the part you’d run on your own data. It only needs a file with customer, month and mrr columns:
import pandas as pd
payments = pd.read_csv("payments.csv") # customer, month, mrr
LAST = pd.Period("2025-12", "M") # last month of data
# 1. Cohort = the first month each customer paid.
payments["cohort"] = payments.groupby("customer")["month"].transform("min")
# 2. Lifetime month = months since joining (0 = the month they joined).
month = pd.PeriodIndex(payments["month"], freq="M")
cohort = pd.PeriodIndex(payments["cohort"], freq="M")
payments["age"] = (month.year - cohort.year) * 12 + (month.month - cohort.month)
def table(values, aggfunc):
t = payments.pivot_table(index="cohort", columns="age",
values=values, aggfunc=aggfunc, fill_value=0)
t = t.reindex(columns=range(12), fill_value=0)
for c in t.index: # blank out the future
seen = (LAST - pd.Period(c, "M")).n
t.loc[c, t.columns > seen] = None
return t
# 3. User retention: customers still paying / customers in month 0.
active = table("customer", "nunique")
users = active.div(active[0], axis=0) * 100
# 4. Net revenue retention: the cohort's MRR / its month-0 MRR.
mrr = table("mrr", "sum")
nrr = mrr.div(mrr[0], axis=0) * 100
# 5. Gross revenue retention: nobody counts above their month-0 MRR,
# so upgrades are ignored but downgrades and cancellations count.
start = payments[payments["age"] == 0].set_index("customer")["mrr"]
payments["capped"] = payments["mrr"].clip(upper=payments["customer"].map(start))
grr = table("capped", "sum").div(mrr[0], axis=0) * 100
Two details worth copying. The fill_value=0 makes a cohort that lost everyone show 0, not a gap. And the “blank out the future” loop leaves cells empty when they haven’t happened yet: the June cohort is only six months old in December, so it has no month 7.
The real output
Customers still paying, by cohort and lifetime month (pandas printed these; I’ve only tidied the spacing):
age 0 1 2 3 4 5 6 7 8 9 10 11
cohort
2025-01 40 33 26 21 20 16 16 14 14 14 14 14
2025-02 60 33 18 10 6 4 1 0 0 0 0
2025-03 45 40 34 27 26 24 23 23 23 20
2025-04 50 46 44 41 38 37 35 34 32
2025-05 55 50 46 43 39 36 34 33
2025-06 50 48 46 43 43 40 39
User retention, %:
age 0 1 2 3 4 5 6 7 8 9 10 11
cohort
2025-01 100 82 65 52 50 40 40 35 35 35 35 35
2025-02 100 55 30 17 10 7 2 0 0 0 0
2025-03 100 89 76 60 58 53 51 51 51 44
2025-04 100 92 88 82 76 74 70 68 64
2025-05 100 91 84 78 71 65 62 60
2025-06 100 96 92 86 86 80 78
Net revenue retention, %:
age 0 1 2 3 4 5 6 7 8 9 10 11
cohort
2025-01 100 83 62 58 56 45 45 41 41 41 41 41
2025-02 100 50 30 15 10 7 1 0 0 0 0
2025-03 100 86 74 69 68 62 60 60 60 55
2025-04 100 93 90 84 78 77 72 71 66
2025-05 100 93 84 93 83 76 71 69
2025-06 100 97 91 101 101 96 94
Gross revenue retention, %:
age 0 1 2 3 4 5 6 7 8 9 10 11
cohort
2025-01 100 83 62 46 44 33 33 29 29 29 29 29
2025-02 100 50 30 15 10 7 1 0 0 0 0
2025-03 100 86 74 56 55 49 47 47 47 42
2025-04 100 93 90 76 70 69 64 63 58
2025-05 100 93 84 80 69 63 57 56
2025-06 100 97 91 84 84 79 77
One cell checked by hand: the January cohort brought in $980 in month 0. In month 3 (April), 21 of its 40 customers were paying $570 between them, or $450 once upgrades are capped at each customer’s starting price. That’s 21 / 40 = 52.5% of users, $570 / $980 = 58% NRR, and $450 / $980 = 46% GRR, matching the tables.
How to read it
Rows: one group’s life story
Read across a row to follow one cohort as it ages. The shape matters more than any single number.
January loses customers fast for six months, then stops: 35% in month 7, still 35% in month 11. February keeps falling until it hits zero in month 7. Same product, same price, very different groups of people.
Columns: same age, different groups
Read down a column to compare cohorts at the same age. This is how you tell if the business is getting better.
Month 3, user retention: January 52%, March 60%, April 82%, May 78%, June 86%. Something changed in April, and in Rotawise’s made-up story, that’s the onboarding checklist. The total-customers chart could never show you this.
Diagonals: same calendar month
Each diagonal, running from bottom-left to top-right, is one calendar month. July 2025, for example, is June’s month 1, May’s month 2, April’s month 3, and so on up to January’s month 6.
If every cohort drops at once along one diagonal, the cause is probably something that happened that month to everyone: an outage, a price change, a competitor’s launch, a holiday. If the drop is along a column instead, it’s about age: customers tend to leave at that point in their life with you, maybe when a trial discount ends.
Curves that flatten vs curves that fall to zero
The single most important question about any retention curve: does it flatten?
A curve that flattens means a core group of customers found something they keep needing. It’s what product-market fit looks like in data, which is why I’d check this table first in Product-Market Fit: How to Know You Have It.
A curve that keeps falling, however slowly, ends at zero. Every customer in that cohort will eventually be gone, and you’ll be refilling the bucket forever.
Newer cohorts should sit higher
The healthiest pattern is each new cohort’s curve sitting a little above the last one. It means the product, the onboarding or the customer mix is improving. In a16z partner Olivia Moore’s 2022 piece on marketplace retention, she describes healthy cohort lines as bunched close together, with newer cohorts as good as or better than older ones.
Rotawise’s curves do this from April on, with one wobble: May’s month 6 (62%) is below April’s (70%). With 50 to 55 customers per cohort, a few customers either way moves a cell by several points. That’s noise to watch, not yet a trend.
The “smile”
Sometimes a curve falls, flattens, and then curves back up. Moore’s piece calls this a “smile”: it happens when customers who left come back, or when the customers who stay keep spending more.
You see it most in revenue retention, not user retention, because one remaining customer can grow their spend but can’t be more than one person. Rotawise’s June cohort shows a small version in NRR: it drops to 91% in month 2, then jumps to 101% in month 3 when upgrades kick in, while user retention keeps falling. More money from fewer people. That’s what expansion revenue looks like.
Don’t expect a smile. A flat curve is already a good result.
A note on benchmarks
You’ll find “good retention” numbers online, but they vary so much by industry, price and customer type that I don’t think one is useful for a small company. Your best benchmark is your own older cohorts. Is the newest row above the old ones at the same age? That question has a real answer.
The same table in Google Sheets
You don’t need Python. Put the same three columns in a sheet called Payments, with the month as a real date (the 1st of each month), then add three helper columns.
| Column | Header | Formula in row 2 (copy down) |
|---|---|---|
| A | customer | (your data) |
| B | month | (your data, a date such as 1/1/2025) |
| C | mrr | (your data) |
| D | cohort | =MINIFS(B:B, A:A, A2) |
| E | age | =DATEDIF(D2, B2, "M") |
| F | capped | =MIN(C2, SUMIFS(C:C, A:A, A2, E:E, 0)) |
What each does:
MINIFSreturns the smallest value in column B where column A matches this customer: their first month. Format column D as a date.DATEDIFwith"M"returns whole months between two dates. Because every date is the 1st of a month, it gives the exact lifetime month.SUMIFSfinds this customer’s MRR in month 0, andMINcaps each row at that amount, for gross revenue retention.
Now a second sheet, Cohorts. Put the cohort months (1/1/2025 to 6/1/2025) in A5:A10 and the ages 0 to 11 in B4:M4. In B5, then copied across and down:
=IF(EDATE($A5, B$4) > DATE(2025,12,1), "",
COUNTIFS(Payments!$D:$D, $A5, Payments!$E:$E, B$4))
COUNTIFS counts rows where the cohort matches the row label and the age matches the column header. Because there’s one row per customer per month, rows equal customers. The EDATE part adds the age to the cohort month and leaves the cell blank if that month is after your last month of data. That’s the “don’t show the future” rule from the Python version. Swap the last date for your own.
Then build the other blocks next to it, the same shape:
| Block | Cell formula (first cell, copied across and down) |
|---|---|
| Customers | the COUNTIFS formula above |
| User retention % | =IF(B5="", "", B5 / $B5), where B5:M10 is the Customers block |
| Cohort MRR | same as Customers, but SUMIFS(Payments!$C:$C, Payments!$D:$D, $A5, Payments!$E:$E, B$4) |
| Capped MRR | same, summing Payments!$F:$F |
| NRR % | cohort MRR cell / that row’s month-0 MRR |
| GRR % | capped MRR cell / that row’s month-0 MRR |
Add a color scale (Format, then Conditional formatting) to the percentage blocks and the table becomes a heat map.
A pivot table gets you the customer counts with no formulas. Select the Payments data, choose Insert, then Pivot table. Add cohort under Rows, age under Columns, and customer under Values, summarized by COUNTA. Again, one row per customer per month means the count equals customers. Put mrr under Values with SUM instead and you have the cohort MRR block. You’ll still need a few formula cells next to the pivot to divide by month 0.
What to do with it
Here’s how I’d use it.
Find where the curve drops, and fix that moment. Rotawise loses the most customers between month 0 and month 2. That’s usually onboarding: people signed up and never got to the point where the product was useful. Fix the first week before you work on anything else in the funnel.
Find your activation moment. An activation moment is an action that separates customers who stay from customers who leave: for a scheduling app, maybe “published the first full week’s rota.” Split a cohort into customers who did it in their first week and customers who didn’t, and compare their rows. If the gap is big, your onboarding’s whole job is getting people to that action.
Segment by channel and plan. Build the same table for customers from each acquisition channel, or each plan. Rotawise’s February cohort is a warning: a channel that brings lots of signups can bring the wrong ones. Over their first seven months (months 0 to 6), February’s customers paid $53.50 each on average. April’s paid $179.40, more than three times as much. If those channels cost the same per signup, one of them is losing money.
Feed it into your unit economics. Lifetime value (LTV) depends on churn, and the simple formula in Unit Economics in Plain English assumes churn is one fixed number forever. A cohort table shows that it isn’t. Rotawise’s January cohort lost customers quickly, then stopped losing them at all. Use the real curve, or at least the churn from the flat part, instead of one average.
Feed it into your runway. The cash forecast in Default Alive or Default Dead? assumes revenue keeps growing at the recent rate. If your newer cohorts retain worse than your older ones, that growth rate is about to fall. Check the table before you trust the forecast.
Common mistakes
1. Mixing calendar months with lifetime months. “Retention in March” and “retention in month 3” are different questions. If your columns are calendar months, cohorts that joined later have had less time, and you’ll be comparing a three-month-old group to a nine-month-old one. Columns should be age.
2. Survivorship. If you build the table from your current customer list, everyone who left is missing, and retention looks perfect. Start from every customer who ever paid. A quieter version: averaging a column on the right side of the table. Only the oldest cohorts reach month 11, so “average month-11 retention” is really “January’s month-11 retention.”
3. Cohorts that are too small. In a cohort of 40, one customer is 2.5 percentage points. Rotawise’s May-vs-April wobble is that effect. If your cohorts are tiny, group by quarter instead of month, and don’t react to one cell.
4. Counting reactivations without deciding how. A customer who leaves in March and comes back in June will show as active again in this method, so a curve can rise. That’s real, but decide on purpose: keep them in their original cohort (what the code above does) and say so, or treat the comeback as a new start. Don’t count them in both, and don’t change the rule from month to month.
5. Mixing user and revenue retention. “We retain 105%” is almost certainly net revenue retention, not users. Always say which one you mean, and show gross next to net.
Key ideas
- Total-customer and revenue charts hide churn, because new signups cover the leak. Rotawise looked like steady growth while 107 of 300 customers had already left.
- A cohort is a group of customers who started in the same month. Follow each group by lifetime month, not by calendar month.
- User retention counts people. Revenue retention counts money. Gross revenue retention ignores upgrades and can’t exceed 100%; net revenue retention includes them and can.
- Rows show a group’s life, columns compare groups at the same age, diagonals show calendar events.
- The most important question is whether the curve flattens. A curve that keeps falling ends at zero.
- Newer cohorts sitting higher than older ones is the clearest sign your product and onboarding are improving.
- You can build it in an afternoon, with a short pandas script or a few COUNTIFS and SUMIFS formulas in Google Sheets.
Sources: Jeff Jordan, Anu Hariharan, Frank Chen and Preethi Kasireddy, “16 Startup Metrics”, Andreessen Horowitz, 2015 (retention by cohort with month 1 = 100%, gross vs net churn); Olivia Moore, “GMV Retention: The Marketplace Metric Most Ignore”, Andreessen Horowitz, April 2022 (curves that flatten, the “smile,” newer cohorts as good as or better than older ones); Corporate Finance Institute, “Net Revenue Retention (NRR)” (NRR and GRR formulas); Ben Murray, “How to Calculate Gross Dollar Retention”, The SaaS CFO (GRR excludes expansion and maxes at 100%); Google Docs Editors Help: COUNTIFS, SUMIFS, MINIFS, DATEDIF, EDATE, pivot tables. Rotawise and all its numbers are fictional, generated by the script above.
Related: Unit Economics in Plain English, where churn feeds lifetime value; Default Alive or Default Dead?, where retention decides whether growth continues; and Product-Market Fit: How to Know You Have It, where a flattening curve is the strongest signal.



