Survival Analysis Calculator

Enter your survival data — time-to-event, event status (1 = event, 0 = censored), and optionally a group label — to perform Kaplan-Meier survival analysis. This tool estimates survival probability at each time point, calculates median survival time, and runs a log-rank test to compare two groups. Results include a survival curve summary table and key statistics for your cohort.

The alpha level used for the log-rank test p-value threshold.

Number of decimal places for output values.

Enter one subject per line: Time,Event (1=event occurred, 0=censored). Example: 12,1 means event at time 12; 20,0 means censored at time 20.

Optional: Enter a second group to enable log-rank test comparison.

Results

Log-Rank Test p-value

--

Median Survival — Group 1

--

Median Survival — Group 2

--

Log-Rank Chi-Square Statistic

--

Group 1 — Events / Total

--

Group 2 — Events / Total

--

Statistical Significance

--

Kaplan-Meier Survival Curve

Results Table

Frequently Asked Questions

What is Kaplan-Meier survival analysis?

The Kaplan-Meier method is a non-parametric statistical technique used to estimate the survival function from lifetime data. It accounts for censored observations — cases where the event of interest has not occurred by the end of the study period. The result is a step function that drops each time an event occurs, giving you the probability of surviving past each observed time point.

What does 'censored' mean in survival analysis?

Censoring occurs when a subject's event status is unknown — for example, they withdrew from the study, were lost to follow-up, or the study ended before their event occurred. Censored observations are coded as 0 in the event column. These individuals contribute to the at-risk count up to the point of censoring but are then removed from further analysis.

How do I enter data into the Kaplan-Meier calculator?

Enter one subject per line in the format Time,Event — for example, '12,1' means the event occurred at time 12, and '20,0' means the subject was censored at time 20. You can enter data for two groups to enable the log-rank comparison test. Times can be in any unit (days, months, years) as long as you're consistent.

What is the log-rank test and when is it used?

The log-rank test is a hypothesis test used to compare the survival distributions of two or more groups. It calculates a chi-square statistic and p-value to determine whether survival differences between groups are statistically significant. It is most useful when the survival curves do not cross and the proportional hazards assumption holds.

What is median survival time?

Median survival time is the time at which 50% of the study population is estimated to have experienced the event (i.e., survival probability = 0.5). It is the most commonly reported summary statistic from a Kaplan-Meier analysis. If the survival curve never drops to 0.5, the median cannot be estimated from the data.

How do I interpret the p-value from the log-rank test?

If the p-value is less than your chosen significance level (typically α = 0.05), you reject the null hypothesis and conclude there is a statistically significant difference in survival between the two groups. A p-value above α suggests the observed difference could be due to chance. Always interpret this in clinical or scientific context alongside effect size and confidence intervals.

Can I use this calculator with more than two groups?

This calculator supports up to two groups for direct log-rank test comparison. For more than two groups, a pairwise log-rank approach or Cox regression is typically required. If you only enter one group, the Kaplan-Meier survival curve and median survival are still estimated, but the log-rank test will not run.

What is the difference between Kaplan-Meier and Cox regression?

Kaplan-Meier is a non-parametric method that estimates survival probabilities without assuming any underlying distribution — it's ideal for descriptive analysis and comparing groups. Cox proportional hazards regression is a semi-parametric model that allows you to adjust for multiple covariates simultaneously and estimate hazard ratios. For simple two-group comparisons, Kaplan-Meier with a log-rank test is the standard approach.

More Statistics Tools