Sample Size Calculator
Work out how many responses your survey needs for a target margin of error and confidence level, with an optional correction for a finite population.
Quick answer: n = z²·p(1−p) ÷ e². For 95% confidence (z = 1.96), a ±5% margin (e = 0.05) and p = 0.5: n = 1.96² × 0.25 ÷ 0.05² = 384.16, so you need 385 responses.
Before running a survey you need to know how many responses will give a result precise enough to trust. The sample-size formula works backwards from the margin of error you can tolerate and how confident you want to be, then a finite-population correction trims the number when you're sampling a small, known group.
The formulas
n₀ = z² · p(1 − p) ÷ e²
Finite population: n = n₀ ÷ (1 + (n₀ − 1) ÷ N)
Finite population: n = n₀ ÷ (1 + (n₀ − 1) ÷ N)
Worked example
Target 95% confidence, ±3% margin, p = 0.5. n₀ = 1.96² × 0.25 ÷ 0.03² = 1067.1, so you need 1,068 responses (rounding up).
Frequently asked questions
How do I calculate sample size?
n = z²·p(1 − p)/e², where z is the confidence z-value, e the margin of error, and p the expected proportion.
What proportion should I assume?
Use 0.5 if you don't know — it maximises the required sample and keeps you safe. Use a known estimate to reduce n.
When does the population size matter?
Apply the finite-population correction when your sample would be a sizeable fraction of a small, known population.
Why round up?
Rounding up guarantees you meet the target margin; rounding down would leave the survey slightly under-powered.
Related calculators
For general and educational use. Proportion-based survey sample size.