We believe math and science education should be free and accessible to everyone. Why education matters >

Log-Rank Test Calculator

Enter event times and censoring indicators for two groups to compare their survival curves. The log-rank test (also called the Mantel-Cox test) determines whether the two groups have statistically different survival experiences.

What is the Log-Rank Test?

The log-rank test is the most widely used method for comparing survival curves between two or more groups. It is a non-parametric test that works well even with censored data, which is common in clinical trials and time-to-event studies.

How it works:

  1. At each distinct event time, count observed events and subjects at risk in each group
  2. Calculate expected events for each group under the null hypothesis (equal survival)
  3. Sum the observed-minus-expected differences across all event times
  4. Compute the test statistic: χ² = [Σ(O - E)]² / Σ Variance

Key features:

  • Handles right-censored data (subjects lost to follow-up or still event-free at study end)
  • Non-parametric: no assumption about the shape of the survival distribution
  • Tests the null hypothesis that both groups have the same survival function
  • Most powerful when the hazard ratio is constant over time (proportional hazards)

Interpreting results:

A significant result (p < 0.05) means the survival experiences of the two groups are statistically different. It does not tell you which group survives longer; compare the observed vs. expected events to determine direction.

Common applications:

  • Clinical trials comparing treatments
  • Oncology studies comparing cancer therapies
  • Engineering reliability testing
  • Any study measuring time until an event

Did this solve your problem?

Frequently Asked Questions

Search Calculators

Search across all calculator categories