Sample Size Calculator
How many participants are needed for a survey with a given margin of error.
Tip: For a ±3% margin of error at 95% confidence, ~1,067 participants are needed (regardless of population size).
Did this tool help?
About this digital tool
The sample size calculator finds how many people or observations are needed for a survey to have the accuracy you want. Choose the confidence level (90%, 95% or 99%), the margin of error as a percentage and the expected population proportion, and get the required sample size.
The formula is n = z² × p × (1 − p) ÷ e². With 95% confidence (z = 1.96), a 5% margin (e = 0.05) and p = 50%: n = 3.8416 × 0.25 ÷ 0.0025 = 384.16, which rounds up to 385. A value of p = 50% gives the safest size when the proportion is unknown. It is used in opinion polls, in market studies, in health research and in any project that collects data from a group.
How to use
- Choose the confidence level: 90%, 95% or 99%.
- Enter the margin of error you accept, as a percentage (e.g. 5).
- Enter the expected population proportion; leave it at 50% if you don't know.
- Read the sample size you need to collect.
Frequently asked questions
Why doesn't sample size depend much on the population?
For populations above ~10,000, the required sample size levels off. E.g. for a ±3% error, ~1,067 are needed for 50,000 and for 5 million alike.
How is the sample size for a survey calculated?
n = z² × p(1 − p) ÷ e², rounded up. For 95%, a 5% margin and p = 50% it comes to 385 people.
Why is a 50% proportion usually used?
Because p(1 − p) reaches its maximum of 0.25 when p = 50%, so it gives the largest and safest sample when you don't know the true proportion.
How many people are needed for a 3% margin of error?
With 95% confidence and p = 50%: 3.8416 × 0.25 ÷ 0.0009 ≈ 1067.1, so 1,068 people. With 99% confidence and a 5% margin, 664 are needed.