Home› Statistics› Sample Size Calculator

Sample Size Calculator

Calculate the minimum sample size for a survey or A/B test given desired confidence level and margin of error.

Inputs

Sample size needed
—
For unlimited population
—
Z-score used
—
Target margin of error
—
Confidence level
—

About Sample Size Calculator

Common sample sizes

±5% at 95% confidence: 384 (rounded to 400). ±3% at 95%: ~1,067. ±1% at 95%: ~9,600. National polls of 1,000 routinely report ±3% MOE.

Why p = 0.5 is worst case

Variance is maximized at 50/50 split — you need the most samples when you have no prior. If you have a prior (e.g., last poll was 60/40), use that to reduce the required sample size.

A/B test sample size

Different formula — depends on the minimum detectable effect (MDE), baseline conversion rate, and power. Use a dedicated A/B test calculator for accurate numbers.