Log-Rank Test calculator
Compare survival distributions of two or more groups. Perform an online log-rank test with p-value, chi-square, and hazard ratios.
What it does
Compares survival curves between groups across the whole follow-up, weighting every event time equally.
When to use it
Two or more groups with time-to-event outcomes, when you want a single test of whether survival differs.
Cautions
- It is most powerful when hazards are proportional. Crossing curves can produce a non-significant result even when survival plainly differs.
- It tests whether curves differ, not by how much. Pair it with a hazard ratio or a difference in restricted mean survival.
Alternatives
- Cox proportional hazards — you need to adjust for covariates or want an effect size, not just a p-value
- Restricted mean survival time — the curves cross — the log-rank test has little power there
How to read the output
- χ², df and p
- The accumulated difference between observed and expected events across the groups; df is groups − 1. The log-rank statistic is a test, not an estimate — it carries no effect size of its own. Quoting its p as the whole result reports significance with nothing to say how big the difference is. Use the hazard ratio from the Cox table below the curve, or a difference in restricted mean survival, for that.
- Crossing curves
- The log-rank is most powerful when one group is consistently worse throughout follow-up. When curves cross, early and late differences cancel inside the statistic and a large real difference can return a large p. Look at the plot before believing a null result — this is the failure the test cannot report on itself.
- The step curve
- The estimated probability of still being event-free at each time. It steps down only when an event occurs; censored patients leave quietly and simply reduce the number still at risk. Everything here assumes censoring is non-informative: a patient still event-free when their record ends must be no more and no less likely to have the event than one who stayed under observation. Patients withdrawn BECAUSE they were deteriorating break that assumption, and no amount of data fixes it.
- The number-at-risk table
- How many patients remain under observation at each time point. It is the honest scale of the curve above it. Read the curve only as far as the numbers support. The right-hand tail is estimated from a handful of patients — a step there moves the line a long way and means almost nothing. If the table reads 4, 2, 1, do not quote survival at that time.
- Median survival
- The time at which the curve crosses 50%. It is undefined — correctly shown as not reached — whenever the curve never falls to 50%. That is a finding, not a failure, and it should be reported as 'median not reached' rather than substituted with the longest follow-up time.
- Stratified log-rank, when set
- The comparison is made within each stratum and then combined, so a variable that differs between groups cannot drive the result. The result notes when stratification was dropped for having too few complete observations per stratum — in that case you are reading the unstratified test.
How this calculator is validated · Which statistical test should I use?