Predicting customer churn is, at its core, a survival-analysis problem. A subscription business rarely loses an account in one dramatic moment. Cancellations arrive instead as a slow drip spread across months, some accounts lapse quietly after a single missed renewal, others hang on for years before finally leaving. Survival analysis is the branch of statistics built for data shaped exactly like this. In clinical research the event of interest is death or relapse; in a subscription business it is cancellation. Either way, on the day the data is pulled, many patients are still alive and many accounts are still active, and throwing that information away would waste most of the dataset. What follows works through the Kaplan-Meier and Cox proportional-hazards machinery that oncology trials rely on, then shows, with a fully reproducible worked example and peer-reviewed sources on both the clinical and commercial sides, how the same math models customer churn.

Two things set this piece apart from most business-analytics explainers on the topic. Every clinical citation below links to a real, indexed paper, and the central worked example is not a hypothetical case study dressed up as a real company, but a survival curve and a Cox model fitted live to a genuine 228-patient oncology dataset that ships inside the standard R statistics environment, backed by a second, clearly labeled illustrative table showing how the identical arithmetic applies to eight hypothetical subscriber accounts.

In Simple Words

Survival analysis answers one question, how long until something happens. For a hospital that might mean how long a patient lives after diagnosis. For a subscription company it means how long a customer keeps paying before canceling. Ordinary averages break down here because, at the moment you check, a lot of patients are still alive and a lot of customers are still subscribed, and you do not yet know their final outcome. Kaplan-Meier curves show the pattern of who is still “surviving” (or still subscribed) over time, and Cox regression identifies which factors speed up or slow down the event.

Key Takeaways

  • Survival analysis (also called time-to-event analysis) estimates the probability that a patient, subscriber, or account has not yet experienced a defined event by a given time point, and it is built to use “censored” records, meaning still-active accounts, rather than discard them.
  • The Kaplan-Meier estimator, published by Edward Kaplan and Paul Meier in 1958, has been cited more than 70,000 times and produces the step-shaped curve that most survival plots are built around.
  • The Cox proportional-hazards model, introduced by David Cox in 1972, quantifies how factors such as contract type, usage frequency, or support-ticket volume change the hazard of churn relative to a reference group.
  • Ghent University researchers Dirk Van den Poel and Bart Larivière were among the first to apply proportional-hazards survival models directly to customer attrition data in a peer-reviewed operations-research journal, and a related 2007 study applied the same framework to a pay-TV subscription operator.
  • The log-rank test, described for a clinical audience by Bland and Altman in a widely used 2004 BMJ paper, is the standard way to check whether two Kaplan-Meier curves, for example month-to-month versus annual-contract subscribers, differ by more than chance.

What Is Survival Analysis, and Why Does It Fit Customer Churn?

Survival analysis studies the time until a defined event occurs, and it was developed to solve a problem ordinary regression handles poorly, the reality of incomplete follow-up. A clinical trial ends before every patient has died; a subscription dataset gets pulled before every customer has canceled. Statisticians call an unfinished observation “right-censored,” meaning the event has not yet happened for that person or account by the last time they were observed, not that the data point is missing or wrong.

Treating a censored subscriber as though they will never churn, or dropping them from the dataset entirely, both introduce bias. Researchers in the clinical research literature settled on survival methods precisely because they use every day a patient or customer contributed, censored or not, rather than only the outcomes that happened to be observed by the cutoff date. That same logic, which keeps a five-year cancer trial from underestimating survival, keeps a churn model from overestimating how loyal an average subscriber looks. For a deeper walk through the discipline as it is taught in epidemiology, the underlying assumptions carry over almost unchanged into a commercial subscription setting.

The Building Blocks: Survival Function, Hazard Function, and Censoring

Two functions do most of the work in survival analysis. Written S(t), the survival function gives the probability that the event has not yet occurred by time t, starting at 1.0 (everyone is event-free at time zero) and stepping down toward zero as events accumulate. Written h(t), the hazard function gives the instantaneous risk of the event happening at time t, given that the subject has survived up to that point. A rising hazard function for a customer cohort means cancellation risk is accelerating the longer people stay, the opposite of what most subscription businesses assume.

Right-censoring, where the event has not happened by the end of the observation window, is the type analysts run into constantly with churn data, since every account still paying on the day the dataset is extracted is right-censored by definition. Left-censoring and interval-censoring show up less often in subscription data but matter in clinical work, for instance when a diagnosis date is only known to have occurred sometime before enrollment. Getting the censoring indicator right, one column marking whether each row ended in an actual event or in observation cutoff, is the single most common source of error when a business analyst builds their first survival model.

The Kaplan-Meier Estimator, Charting How Long Customers Stay

Survival analysis

Edward Kaplan and Paul Meier introduced the estimator that carries their names in a 1958 Journal of the American Statistical Association paper, “Nonparametric Estimation from Incomplete Observations,” now cited more than 70,000 times, making it one of the most referenced papers in the history of applied statistics. Sometimes called the product-limit estimator, the method recalculates the survival probability at every point an event occurs by multiplying the running probability by the fraction of the still-at-risk group that survived that step. Censored observations leave the risk set without pulling the curve down, which is exactly why the method handles incomplete subscription data correctly instead of quietly penalizing accounts that simply have not had time to churn yet.

A Kaplan-Meier plot for a subscriber base looks like a descending staircase rather than a smooth curve, and each step marks a point where at least one account canceled. Rich and colleagues’ widely used 2010 practical guide, published in Otolaryngology-Head and Neck Surgery, walks through exactly this kind of step-by-step reading of the curve, including how to locate median survival time (the point where the curve crosses 0.50) and how tick marks along a flat segment represent censored subjects rather than a pause in risk. Applied to a subscription cohort, the same reading skills translate directly. Where the curve is steep, churn is concentrated, and where it flattens, the surviving accounts have settled into a stable, low-risk pattern. Kaplan-Meier estimation, as applied in oncology research, uses identical mathematics, just with “death” relabeled as “cancellation.”

Comparing Groups with the Log-Rank Test

Plotting two Kaplan-Meier curves side by side, say, month-to-month subscribers against annual-contract subscribers, raises an obvious question. Is the visible gap real, or could it show up by chance in a sample this size? A log-rank test answers that question directly, comparing the observed number of events in each group at every time point against the number that would be expected if both groups shared a single underlying survival curve.

Martin Bland and Douglas Altman’s 2004 BMJ Statistics Notes entry on the logrank test remains one of the most accessible explanations of the method for a non-specialist audience, and it makes a point that translates well to churn analysis. Rather than the exact censoring times themselves, the test uses only the ranking of when events happened relative to each other, so it holds up even when the underlying survival distribution is not neat or symmetric, a common situation in real subscriber data. A significant log-rank result tells an analyst that the annual-contract curve and the month-to-month curve genuinely diverge; it does not by itself explain which specific customer attributes are driving that gap, which is where the Cox model takes over.

The Cox Proportional Hazards Model and the Drivers of Churn

David Cox’s 1972 paper “Regression Models and Life-Tables” in the Journal of the Royal Statistical Society, cited more than 36,000 times, solved a problem the Kaplan-Meier estimator alone cannot solve, quantifying the effect of several covariates on time-to-event risk at once without having to specify the exact shape of the baseline hazard. Cox’s proportional-hazards model estimates a hazard ratio for each covariate. A hazard ratio of 1.4 for “fewer than two logins in month one,” for instance, would mean that behavior is associated with a 40% higher instantaneous risk of cancellation than the reference group, holding the other covariates constant.

Because it is a genuinely multivariate technique, a Cox model can separate the effect of price sensitivity from the effect of onboarding engagement even when the two are correlated in the raw data, something a series of one-variable comparisons cannot reliably do. That same multivariate reasoning used across other business-statistics problems applies directly here, and the clinical version of the model, including how the proportional-hazards assumption is checked and reported, is covered in more depth in Editverse’s guide to the Cox model in chronic disease research.

Why the Same Statistics Used in Oncology Trials Work for Subscription Churn

A clinical trial and a subscription business map onto each other more closely than most people assume. A patient enrolled at diagnosis becomes a customer enrolled at signup; relapse or death becomes cancellation; loss to clinical follow-up becomes a customer who is still active when the dataset was pulled. Every technique built to handle incomplete cancer-trial follow-up, including censoring, hazard ratios, and the log-rank test, was designed around exactly the kind of “not yet happened” data that dominates subscriber records.

Published research backs the parallel, not just intuition. Dirk Van den Poel and Bart Larivière, both at Ghent University, published “Customer Attrition Analysis for Financial Services Using Proportional Hazard Models” in the European Journal of Operational Research in 2004, a paper now cited more than 400 times, applying the Cox framework directly to customer attrition rather than to disease outcomes. Three years later, Jonathan Burez and Van den Poel published “CRM at a Pay-TV Company” in Expert Systems with Applications, cited more than 230 times, which used hazard-based analytical models to reduce subscriber attrition at a subscription television operator through targeted retention marketing. Both papers ran in peer-reviewed operations-research and applied-analytics journals rather than marketing blogs, and both used the identical Kaplan-Meier and Cox machinery described above, just with “subscriber” written where a clinical paper would write “patient.” Readers curious how this compares with newer machine learning approaches to business intelligence will find that most churn-prediction pipelines built on gradient boosting or neural networks still borrow the censoring logic straight out of survival analysis, because the underlying data problem, incomplete observation of a future event, never goes away.

A Fully Reproducible Worked Example: Survival Analysis on Real Time-to-Event Data

Rather than describe a fictional company’s churn numbers, the table below reports the actual output of a Kaplan-Meier fit and a Cox proportional-hazards model run against a genuine, publicly documented dataset, the NCCTG lung cancer dataset that ships with the R survival package. Those data originate from a 1994 Journal of Clinical Oncology study by Loprinzi and colleagues at the North Central Cancer Treatment Group, which tested whether patient-completed questionnaires added prognostic information beyond what a physician recorded.

Metric (computed directly from the dataset)Value
Patients analyzed228
Deaths observed (events)165
Censored, alive at last contact63 (27.6%)
Median survival time310 days (95% CI 285-363)
Survival probability at 180 days72.2% (95% CI 66.6-78.3%)
Survival probability at 365 days40.9% (95% CI 34.5-48.6%)
Cox hazard ratio, female vs. male0.575 (95% CI 0.414-0.799, p=0.001)
Cox hazard ratio, per 1-point rise in ECOG performance status1.590 (95% CI 1.273-1.986, p<0.001)
Model concordance (C-statistic)0.637

Every figure in that table maps onto a churn interpretation without changing the math. A hazard ratio below 1.0, like the 0.575 shown for sex in this dataset, means that group faces lower risk than the reference group at every point in time; in a churn model, a hazard ratio of 0.575 on “enrolled through a partner referral” would mean referred customers cancel at roughly 43% lower risk than customers acquired through paid search, all else equal. A hazard ratio above 1.0, like the 1.590 shown for ECOG performance status here, means the covariate raises risk; the same pattern would show up in a churn model as a covariate such as “opened fewer than one support ticket in month one” raising cancellation risk, since disengaged customers who never even reach out for help are often the ones quietly heading for the exit.

Applying Survival Analysis to a Customer Churn Cohort: An Illustrative Walkthrough

To show how the identical Kaplan-Meier arithmetic plays out on subscription data, the table below walks through eight hypothetical subscriber accounts. Every number here is illustrative, built for this explanation rather than pulled from any company’s records, meant to demonstrate the calculation rather than represent a benchmark churn rate.

AccountTenure (months)Outcome
A3Canceled
B5Canceled
C6Still active (censored)
D8Canceled
E9Still active (censored)
F11Canceled
G12Still active (censored)
H14Still active (censored)

Working through the product-limit calculation by hand shows exactly what the software does internally. At month 3, all 8 accounts are at risk and one cancels, giving a survival estimate of 7/8, or 0.875. At month 5, 7 accounts remain at risk and one more cancels, so the running estimate becomes 0.875 multiplied by 6/7, or 0.75. Account C leaves the risk set at month 6 through censoring, not cancellation, so the curve does not step down; it simply carries 0.75 forward. At month 8, 5 accounts remain at risk and one cancels, dropping the estimate to 0.75 multiplied by 4/5, or 0.60. After Account E censors at month 9, only Accounts F, G, and H remain at risk, and when F cancels at month 11 the estimate falls to 0.60 multiplied by 2/3, or 0.40. Because the curve crosses the 0.50 mark between months 8 and 11, the median time to cancellation in this small illustrative cohort is 11 months, the same way a median survival time is read off a clinical Kaplan-Meier plot. Analysts moving from spreadsheets into a statistical package for this kind of build should see the practical, step-by-step data preparation guidance written for survival-format datasets, since getting the account-level time and status columns structured correctly is what makes this calculation possible in the first place.

Customer Lifetime Value: Connecting Survival Curves to Revenue

Customer Lifetime Value

Customer lifetime value is, mathematically, the area under a survival curve multiplied by margin per period. Summing S(t) across every future period and multiplying by the profit earned from an active customer in each period gives an expected lifetime value that does not require assuming customers all behave identically, because the survival curve already encodes the fact that some accounts churn early and others persist for years.

A simplified version of that formula shows up constantly in retention team dashboards. When the monthly hazard of cancellation is roughly constant over time, expected customer lifetime value approximates monthly margin divided by the monthly hazard rate. As pure arithmetic, not a claimed statistic, fifty dollars of monthly margin divided by a 0.05 monthly hazard works out to a one-thousand-dollar expected lifetime value; swap in a business’s own margin and hazard estimates and the same formula produces a business-specific number instead of an industry rule of thumb. That constant-hazard shortcut breaks down whenever the hazard changes with tenure, which is common since many subscription businesses see hazard spike right around the renewal date, and that is exactly the situation where a full Cox model, rather than a single average churn rate, earns its keep. Ordinary descriptive statistics of the kind most market-dynamics reporting relies on capture the average, but only a survival model captures the shape of risk over the customer relationship, exactly what a predictive retention strategy needs in order to time an intervention correctly.

Preparing Data for a Churn Survival Model

Four decisions determine whether a churn survival model produces trustworthy hazard ratios or quietly biased ones. Choosing the time origin matters most, since signup date, first payment date, and end of a free trial all produce different survival curves from the same raw events, so the origin needs to match the business question being asked. Defining the event itself matters just as much; a “canceled” flag that fires at the request date rather than the actual service-end date will systematically understate tenure.

A dedicated column needs to carry the censoring indicator, coded consistently so every still-active account is marked as censored at the data-pull date rather than silently dropped or treated as an early churn. Covariates that change over the course of the relationship, like usage frequency or support-ticket count, need to be captured as time-varying covariates rather than frozen at signup values, since a customer who used the product heavily in month one and stopped in month six looks nothing like one who was consistently disengaged throughout. Editverse’s Stata-based guide to preparing patient data for survival analysis walks through this same set of decisions for clinical datasets, and the checklist transfers to subscription data almost without modification.

Non-Proportional Hazards, Competing Risks, and Other Pitfalls

Cox models assume the hazard ratio between two groups stays constant over the whole follow-up period, an assumption worth checking rather than taking on faith. When it fails, for example if annual-contract customers start out at much lower risk than monthly customers but the gap narrows near the two-year mark, an extended Cox model with time-interacted covariates or a stratified Cox model, which allows a different baseline hazard per stratum while keeping covariate effects shared, generally fixes the problem without abandoning the framework entirely.

Competing risks introduce a separate complication. An account might be lost to a straightforward cancellation, or it might disappear because the company was acquired, the product line was discontinued, or the customer’s business itself closed. Treating every one of those exits as an ordinary churn event overstates the risk attributable to price or product dissatisfaction. Austin, Lee, and Fine’s 2016 Circulation paper on competing risks shows, in a cardiovascular setting, that naively treating a competing event as an ordinary censoring event biases the cumulative incidence estimate upward, a finding that carries over directly to churn data with multiple distinct exit reasons. A competing risks framework, covered in more depth elsewhere on this site, together with the related multistate modeling approach for tracking accounts through several distinct states, gives a business analyst a way to separate “chose to leave” from “left for a reason outside the product entirely.”

From Model to Retention Strategy: Acting on Hazard Ratios

A Cox model earns its value the moment its hazard ratios get translated into a targeting rule. If disengagement in the first thirty days carries a hazard ratio of 2.0, a retention team has a concrete, quantified reason to trigger onboarding outreach specifically in that window rather than spreading a fixed retention budget evenly across the customer base. Because the hazard function, not just the average churn rate, is available from the model, timing matters as much as targeting, since an intervention scheduled to land just before a hazard spike, such as the days surrounding an annual renewal date, will outperform the same message sent at a random point in the relationship.

Segmenting customers by predicted hazard rather than by simple demographic buckets also lets a team retire the common but costly habit of offering the same discount to everyone who might be at risk. A broader predictive-analytics toolkit built around customer retention extends this same idea with machine learning scoring layered on top of the survival framework, though the hazard ratio from a well-specified Cox model remains the most interpretable starting point for explaining to a non-statistician exactly which behaviors are driving cancellations and by how much.

Conclusion

Survival analysis gives a subscription business the same rigor that oncology trials have relied on for more than sixty years, a way to use every account’s data, whether it ended in cancellation or is still active on the day the numbers were pulled, without discarding information or biasing the estimate. Kaplan-Meier curves show how a cohort’s retention unfolds over time, the log-rank test confirms whether two curves genuinely differ, and the Cox proportional-hazards model quantifies exactly which customer attributes speed up or slow down that risk.

None of this requires taking anyone’s word for it. A worked example above ran on a real, publicly available dataset, the churn bridge rests on peer-reviewed operations-research papers rather than marketing case studies, and an illustrative subscriber table shows the arithmetic in full so a reader can check every step.

Need Your Own Survival Model Built or Checked?

Editverse’s Just Data Service pairs raw time-to-event or subscription data with a statistician who runs the Kaplan-Meier and Cox proportional-hazards analysis, checks the proportional-hazards assumption, and writes up the methods and results, ready for a manuscript, board report, or internal review.

FAQ

What is survival analysis, and why is it also called time-to-event analysis?

Survival analysis studies how long it takes for a defined event, such as death, disease relapse, or a subscription cancellation, to occur. Analysts also call it time-to-event analysis, since the outcome being modeled is a duration rather than a yes-or-no result, and the method is specifically built to handle records where the event has not yet happened by the end of the observation period.

What does “censoring” mean when applied to subscription or customer data?

A censored record is one where the event of interest has not occurred by the last time the subject was observed. Every customer still paying on the date a churn dataset is extracted is right-censored, meaning their eventual outcome is unknown, but the months they contributed while active still count in the analysis.

What is the difference between the Kaplan-Meier estimator and the Cox proportional-hazards model?

Kaplan-Meier estimation produces a single survival curve for a group and is typically used to visualize or compare overall retention patterns. Cox regression goes further, estimating how multiple covariates simultaneously raise or lower the hazard of the event relative to a reference group, which is what makes it useful for identifying specific churn drivers rather than just describing a curve.

What is a hazard ratio, and how should a retention team read one?

A hazard ratio compares the instantaneous risk of the event between two groups at any given moment. A hazard ratio of 1.0 means no difference; above 1.0 means higher risk than the reference group; below 1.0 means lower risk. A hazard ratio of 1.5 on a covariate means that factor is associated with 50% higher instantaneous churn risk, holding other covariates constant.

What is the log-rank test used for?

A log-rank test checks whether two or more Kaplan-Meier curves, such as churn curves for two pricing tiers, differ by more than would be expected from random sampling variation, comparing observed versus expected event counts across the follow-up period to return a p-value for that comparison.

How does survival analysis connect to customer lifetime value?

Customer lifetime value is mathematically related to the area under a survival curve multiplied by the margin earned per period. Because the survival curve reflects the actual shape of retention risk over time rather than a single average churn rate, a survival-based lifetime value estimate adapts to cohorts where risk changes with tenure, such as spikes around renewal dates.

What is the proportional-hazards assumption, and what happens if it is violated?

A standard Cox model assumes the hazard ratio between groups stays constant across the entire follow-up period. When that assumption is violated, an extended Cox model with time-interacted covariates, or a stratified Cox model that allows the baseline hazard to differ by group, generally corrects the problem.

What software is used to run survival analysis on churn data?

R’s survival package, Python’s lifelines and scikit-survival libraries, Stata’s stset and stcox commands, and SAS PROC LIFETEST and PROC PHREG are the most commonly used tools, and all of them implement the same Kaplan-Meier and Cox proportional-hazards mathematics described throughout this article.

References