Advanced Log Rank Test Calculator

Estimate group differences using observed and expected events. Track censoring with clear pooled risk tables. Plot survival patterns, export findings, and explain test outcomes.

Calculator Inputs

Use one line per subject. Example: 8,1 means event at time 8. Example: 8,0 means censored at time 8.
Separators may be commas, spaces, semicolons, or vertical bars.

Example Data Table

This sample mirrors the default records loaded in the calculator.

Subject Group Time Status Meaning
1Group A21Event observed
2Group A30Censored
3Group A51Event observed
4Group A61Event observed
5Group B41Event observed
6Group B50Censored
7Group B91Event observed
8Group B110Censored

Formula Used

The log rank test compares event counts across pooled event times. At each event time j, the calculator computes the risk set, observed events, expected events, and variance for both groups.

Expected events for Group 1: E1j = dj × (n1j / nj)

Expected events for Group 2: E2j = dj × (n2j / nj)

Variance contribution: Vj = [n1j × n2j × dj × (nj - dj)] / [nj2 × (nj - 1)]

Chi-square statistic: X2 = (O1 - E1)2 / V

Kaplan-Meier survival: S(t) = ∏ (1 - di / ni) across ordered event times.

Here, O is the total observed event count, E is the total expected event count, and V is the summed variance across all pooled event times. The p-value is approximated from a chi-square distribution with one degree of freedom.

How to Use This Calculator

  1. Enter a label for each comparison group.
  2. Choose the time unit used in your survival data.
  3. Paste one record per line for each group using time,status.
  4. Use status 1 for an event and 0 for censoring.
  5. Set alpha and decimal precision to match your reporting style.
  6. Submit the form to view the survival plot, pooled event table, and test summary.
  7. Download the result summary as CSV or export the report area as PDF.

Frequently Asked Questions

1. What does the log rank test measure?

It tests whether two survival curves differ over time. It compares observed and expected events at each pooled event time while accounting for censoring and changing risk sets.

2. What does status 1 or 0 mean?

Status 1 means the event happened at that recorded time. Status 0 means the observation was censored, so the event was not observed before follow-up ended.

3. Can this calculator handle censored observations?

Yes. Censored records stay in the risk set up to their censoring time. They affect at-risk counts but do not contribute as events in the test statistic.

4. What does a small p-value mean here?

A small p-value suggests the survival experience differs between groups more than random sampling would usually explain. Many reports compare it against alpha, such as 0.05.

5. Does the calculator estimate hazard ratios?

No. This page focuses on the log rank comparison and Kaplan-Meier display. Hazard ratios usually come from a Cox proportional hazards model, not directly from the log rank test alone.

6. Why might median survival show as not reached?

Median survival is only reached when the Kaplan-Meier estimate drops to 0.50 or lower. If survival remains above that level, the median is not observed.

7. Can I use spaces instead of commas?

Yes. The parser accepts commas, spaces, semicolons, and vertical bars between time and status values, provided each line still has exactly two meaningful fields.

8. When should I avoid relying only on this test?

Avoid relying on it alone when you need covariate adjustment, more than two complex strata, or proportional hazards checking. In those cases, broader survival modeling is better.

Related Calculators

spearman rank correlation calculatoriqr calculatorkernel density estimatorfisher exact test calculatorgoodman kruskal gammacramer v calculatortheil sen estimatorkruskal wallis test calculatoranderson darling test calculatordistribution similarity test

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.