How many participants — and, more fundamentally, how many events — to detect a hazard ratio between two groups.
In survival analysis, power comes from events, not from enrollment. The Schoenfeld formula gives the required number of events, E = (z1−α/2 + z1−β)² / (π₁·π₂·(ln HR)²), where π₁, π₂ are the allocation fractions; total enrollment is then E divided by the overall event probability over your follow-up. With the defaults (HR 0.75, 30% event probability, equal arms) you need about 380 events ≈ 1,265 participants.
Two things this formula assumes: proportional hazards (check Schoenfeld residuals in the analysis), and that your event-probability estimate already reflects the planned follow-up length and any competing risks. A rarer event or shorter follow-up raises enrollment even when the hazard ratio stays the same.
A sample size is one line of a statistical plan. MedStatica turns a plain-language description of your study into the full plan — design, recommended analysis, power, causal diagram, methods paragraph, and runnable R, Python, SAS, and Stata code. The first plans are free, no card required.
Plan my study free →Related calculators: comparing two proportions · logistic regression (events per variable) · comparing two means · all calculators