Sample Size Calculator
How many participants you need for a target margin of error and confidence.
Use p = 50% for the most conservative (largest) sample.
Sample size for a proportion is n = z² · p(1 − p) ÷ E². At 95% confidence (z = 1.96), an unknown proportion (p = 0.5), and a ±5% margin: n = 1.96² × 0.25 ÷ 0.05² = 384.16 → round up to 385 participants.
Planning a survey or study
Sample size balances precision against cost. A tighter margin of error or a higher confidence level both demand more participants, and because the margin shrinks with √n, each gain in precision costs disproportionately more people. This tool inverts the confidence-interval formula to solve for the minimum n that meets your targets.
for a proportion; for a mean, n = (z · σ ÷ E)²
Worked example
A yes/no survey at 95% confidence (z = 1.96), unknown proportion (p = 0.5), and a ±5% margin of error.
- 1 Maximize the variance term. With p unknown, use p = 0.5, so p(1 − p) = 0.5 × 0.5 = 0.25.
- 2 Plug into the formula. n = 1.96² × 0.25 ÷ 0.05² = 0.9604 ÷ 0.0025 = 384.16.
- 3 Always round up. A fractional person isn’t possible, so round 384.16 up to 385 participants.
Sample size for a proportion (p = 0.5)
Participants needed at common confidence levels and margins of error.
| Margin | 90% (z=1.645) | 95% (z=1.96) | 99% (z=2.576) |
|---|---|---|---|
| ±10% | 68 | 97 | 166 |
| ±5% | 271 | 385 | 664 |
| ±3% | 752 | 1,068 | 1,844 |
| ±1% | 6,766 | 9,604 | 16,590 |
Choosing inputs and adjusting the result
Why p = 50% is the default. The term p(1 − p) is largest at p = 0.5, so using it gives the most conservative — biggest — sample. If you have a solid prior estimate of the proportion, plugging it in lowers the required n.
Proportion vs mean. Use the proportion mode for yes/no questions; use the mean mode, n = (z · σ ÷ E)², when estimating an average and you have a known or estimated population standard deviation.
Finite populations. The formula assumes a large population. For a small, finite one, apply the correction n′ = n ÷ (1 + (n − 1) ÷ N), which can sharply reduce the number needed.
Plan for non-response. This n is the number of completed responses you need. Inflate your invitations to cover the people who won’t reply — divide n by your expected response rate.