Sample-size planning calculator
Explore two-sided comparisons of independent means or proportions, or one sample against a fixed population value. Results are planning approximations, not a completed study-design assessment.
Runs entirely in your browser, including offline. No inputs are uploaded. Version: 25 October 2026.
Planning estimate
analyzable participants
| Sample | Analyzable | Recruitment target |
|---|
Methods and limits
All options use two-sided normal-approximation planning for a nonzero difference. Let zα = Φ⁻¹(1 − α/2), zpower = Φ⁻¹(power), Δ be the difference, and r = n₂/n₁.
- Two means: n₁ ≈ (zα + zpower)²(σ₁² + σ₂²/r)/Δ².
- One mean: n ≈ (zα + zpower)²σ²/Δ². The reference mean is treated as fixed, with no sampling uncertainty.
- Two proportions: p̄ = (p₁ + rp₂)/(1+r); n₁ ≈ [zα√{p̄(1−p̄)(1+1/r)} + zpower√{p₁(1−p₁)+p₂(1−p₂)/r}]²/Δ².
- One proportion: n ≈ [zα√{p₀(1−p₀)} + zpower√{p₁(1−p₁)}]²/Δ².
Sample sizes are rounded up, with at least two observations per sample. For two groups, n₂ is rounded up from rn₁, so the final ratio may differ slightly. The closed-form two-sided approximation ignores the remote tail. Proportions near 0 or 1 and low expected event counts need exact methods or simulation. Specified SDs do not account for uncertainty in their estimates.
This tool does not calculate crossover, paired, clustered, survival, non-inferiority, equivalence, sequential or multiplicity-adjusted designs. It does not determine whether your chosen effect size, loss rate or analysis method is appropriate. A statistical analysis plan should document and assess these assumptions.