Statistical Calculators › Survival Analysis › Log-Rank Test Sample Size (Two Groups)
← All Calculators

Survival Analysis

Log-Rank Test Sample Size (Two Groups)

Estimate the sample size required for a two-group log-rank test using the Freedman proportional-hazards approximation. Enter the anticipated survival proportions at a common time point, along with alpha and desired power. Runs entirely in your browser.

Study Design

Equal allocation between two groups. The survival proportions should correspond to the same time point.
Freedman approximation assumes proportional hazards and equal allocation. The survival proportions are used to derive the anticipated hazard ratio.

Sample Size Results

The calculation uses the Freedman proportional-hazards approximation for the two-group log-rank test.
Enter the study assumptions and click Calculate Sample Size.

Methodology

This calculator uses the Freedman (1982) approximation for determining the sample size for a two-group log-rank test under proportional hazards. Note that this as its simple Freedman procedure, while STT0 log-rank procedure uses the same Freedman approximation.

Hazard Ratio from Survival Proportions

When the anticipated survival proportions for the two groups are specified at a common time point, the proportional-hazards assumption gives the hazard ratio as:

HR = log(S2) / log(S1)

Here S1 is the survival proportion in Group 1 and S2 is the survival proportion in Group 2. Reversing the group labels produces the reciprocal hazard ratio and the same sample-size requirement because the relevant hazard-ratio terms are squared.

Sample Size Formula

For equal group sizes, the Freedman approximation used by and this method is:

n = [(z1-α/k + z1-β)2 (HR + 1)2] / [(2 - S1 - S2)(HR - 1)2]

The value n is the required sample size in each group before rounding to a whole subject. k = 1 for a one-sided test and k = 2 for a two-sided test. The power is 1 - β.

Expected Events

With equal allocation and fixed follow-up, the anticipated event proportion averaged across the two groups is [2 - S1 - S2] / 2. The calculator therefore reports the corresponding expected number of events after the whole-subject sample size has been rounded upward.

Expected events = N × [2 - S1 - S2] / 2

Assumptions and Scope

This is the simple Freedman method. It assumes proportional hazards, equal allocation, and a common fixed follow-up framework. It does not explicitly model accrual patterns, study duration, time-varying hazard ratios, or detailed dropout processes. When those features materially affect the design, a more detailed survival sample-size procedure or simulation should be used.

Validation Example

the published validation example from Machin et al. uses a one-sided significance level of 0.05, 90% power, Group 1 survival of 0.25, and Group 2 survival of 0.50. The resulting hazard ratio is 0.50 and the required sample size is 62 subjects per group, or 124 total, with 78 events.

References

Freedman, L.S. (1982). “Tables of the Number of Patients Required in Clinical Trials Using the Logrank Test.” Statistics in Medicine, 1, 121–129.

Machin, D., Campbell, M., Tan, S.B., & Tan, S.H. (2018). Sample Size Tables for Clinical Studies, 4th Edition. John Wiley & Sons.

the software. this method Sample Size Software: Logrank Tests (Freedman). Chapter 702.

Statistical Solutions Ltd. Advisor User's Guide, Survival Analysis Tables, STT0: Log-rank test for equality of survival curves in two groups.