Survival analysis: how long until it happens?
Updated October 2026
Survival analysis answers one question: how long until something happens. It turns how long you watched each customer, and whether it happened, into one line that slides down from 100.
Updated October 2026
The short version
Survival analysis answers one question: how long until something happens? It can be how long until a customer stops buying, how long until a subscriber cancels, or how long until a machine breaks. The answer is a line that starts at 100 and slides down as time goes by. You can read the line like a clock: at this time, this many are still going.
What it does
For every person or thing, you note two facts. First, how long you watched them. Second, whether the thing you care about happened. The method turns those two facts, for everyone together, into one curve. The curve shows what share is still going at each point in time. Where the curve crosses 50, half have gone. That time is called the median.
What the data looks like
One row for each customer. Here are three made-up rows, only to show the shape:
| Customer | Months watched | Went quiet? |
|---|---|---|
| A | 1 | Yes |
| B | 9 | Yes |
| C | 12 | No, still buying |
The third column is the clever part. Customer C has not gone quiet yet. We do not know how C's story ends. Analysts call this "censoring". The method does not throw C away, and it does not call C a leaver. It counts C for the 12 months we really saw, and no longer.
A real example
The data are 3,978 customers of one UK online shop, in pounds. We called a customer "lapsed" after six months with no purchase. That is our choice, and a different rule would move the numbers. Of the 3,978 customers, 2,017 had lapsed and 1,961 were still buying at the last look.
Out of every 100 of those customers, this many were still buying:
- after 1 month: 71
- after 3 months: 67
- after 6 months: 61
- after 12 months: 52
The line crosses 50 at about 14 months (a likely range of 13 to 15). In all, 1,140 customers bought in one month only. So the biggest drop came in the very first month, and then the line fell slowly.
The other ways people do it
Three common shortcuts answer a nearby question. Each one misses something.
- Average tenure. Add up how long customers stayed and divide. The trouble is the customers who are still buying. Their stay is not over, so their number is too small. If you leave them out, you keep only the leavers, and the average looks worse than the truth. If you count them as they stand, the average is still too small. Either way, the average is off.
- A churn rate. For example, "We lose 5 percent a month" is one number for the whole life of a customer. It hides when the loss happens. A shop that loses most customers in month one and few after looks the same as a shop that loses them evenly. Those two shops need very different fixes.
- A histogram of lifetimes. A bar chart of how long customers lasted. It has the same trap as the average: it only shows the customers whose story has ended, and it leaves out everyone still buying. The bars lean toward short stays.
Survival analysis answers what each shortcut misses. It uses the customers who are still buying, and it shows the whole shape over time.
When it is better
Use it when two things are true. You care about how long until something happens, and some of the people are not finished yet. That is nearly always the case with customers, subscriptions and anything that has not ended by the day you look. When everyone's story has already ended, a plain average can be fine. That is rare in business.
Why use it
You see when the loss happens, not just how much. You can see the cliff in month one, or the slow slide later, and you can pick the right fix. You also get a median that counts the customers who are still buying fairly. It still depends on your rule for lapsed.
What it does not show
The curve says when customers went quiet. It does not say why. The example is one shop and one group of customers, so it says nothing about which kinds of customers stay longer. Another shop, another season or another rule for "lapsed" would give a different line.
Run it on your own customers
Upload a file with a time column and a flag for who has gone quiet, and read the curve and the median.
Sources: Data: Chen, D. (2012). Online Retail II. UCI Machine Learning Repository. CC BY 4.0. A UK online retailer, GBP. Changes: customers grouped by first purchase month, January 2010 to May 2011; lapsed means six full months with no purchase.
How we ran it
Three things to know about this reading.
Going quiet is our rule
We called a customer lapsed after 6 full months with no purchase. That is a choice, and a different rule would move the numbers. A customer who lapsed is placed at their last purchase month, the point where the quiet began, even though we only know it six months later.
Still-buying customers stay in
1,961 of the 3,978 customers (49.3 percent) were still buying when the data ends. The tool counts them for as long as they were seen, and 2,017 had lapsed.
One shop, one group
This is one UK online shop and one group of customers, so there is no comparison between groups. It shows when customers went quiet, not why.