Sample size calculator

How many responses you need for a survey or experiment, given your target margin of error and confidence level. Optionally apply a finite-population correction.

Required sample size
0
Infinite-population n₀
0
z* (critical)
0
Margin of error
5%
Population

Formula

Infinite population: n₀ = z² × p × (1 − p) / E²

Finite-population correction: n = n₀ / ( 1 + (n₀ − 1) / N )

Use p = 0.5 for the most conservative (largest) sample when the true proportion is unknown.

FAQ

Why does p = 0.5 give the largest sample?

Because p(1 − p) peaks at 0.25 when p = 0.5. Any other value gives a smaller required sample.

What about A/B tests?

For comparing two proportions (control vs variant) and detecting a specific lift with given power, use a power-analysis approach — this calculator handles single-proportion surveys.