Log-Rank Test Calculator
Compare two survival distributions from time-to-event and censoring data with a log-rank chi-square statistic and p value.
About the log-rank test
Log-rank test examples
| Survival data | Result | Interpretation |
|---|---|---|
| Events at 1,2,3 versus 4,5,6 | Chi-square = 5.051661 | Earlier events in group 1 produce a significant difference. |
| Identical event and censoring times | Chi-square = 0, p = 1 | Matching survival patterns create no observed-minus-expected difference. |
| 3 1, 5 0, 8 1 versus 4 1, 6 1, 9 0 | Censoring included | Status zero removes a subject from later risk sets without counting an event. |
How to use the log-rank calculator
- Enter each group 1 subject as a follow-up time followed by event status 1 or censoring status 0.
- Enter group 2 data in the same time units and format.
- Click Calculate Log-Rank Test to construct the event-time risk sets.
- Interpret the chi-square statistic and p value alongside the survival curves.
Log-rank test FAQ
What does censored mean?
A censored subject did not have the event observed during available follow-up. The subject still contributes information to risk sets up to the recorded censoring time.
What is the null hypothesis?
The null hypothesis is that the groups share the same survival distribution. Under it, observed event counts should fluctuate around the counts expected from each risk set.
Does the test estimate a hazard ratio?
No. The log-rank test provides a significance test, while a Cox proportional hazards model is commonly used to estimate a hazard ratio and confidence interval.
Can the test handle tied event times?
Yes. Events occurring at the same time are pooled in one risk-set calculation with the appropriate variance contribution.
What if the survival curves cross?
The ordinary log-rank test can lose power or conceal time-varying effects when curves cross. Inspect the curves and consider methods designed for nonproportional hazards.