About the Sample Size Calculator
Before running a survey or study, you need to know how many people to include. Too few and your results will be unreliable, too many and you waste time and money. The right sample size depends on how confident you want to be and how much error you can accept.
This sample size calculator works out the number of responses needed to estimate a proportion, such as the percentage of customers who are satisfied, or a mean, such as the average order value. Choose a confidence level, set a margin of error, and add your population size if it’s small enough to matter.
How to use the Sample Size Calculator
- Choose whether you are estimating a proportion or a mean.
- Pick the confidence level, most often 95%.
- For a proportion, enter the margin of error and the expected percentage. For a mean, enter the standard deviation and margin of error.
- Optionally enter the population size, then read the sample size you need.
Sample size formulas
- Proportion: n = z² × p × (1 − p) ÷ e²
- Mean: n = (z × σ ÷ e)²
- Finite population: n adjusted = n ÷ (1 + (n − 1) ÷ N)
- z = 1.645 (90%), 1.96 (95%), 2.576 (99%)
The result is rounded up to the next whole person. p = 50% gives the largest sample and is the safe choice when you have no estimate.
Sample size examples
For 95% confidence, a 5% margin of error and p = 50%, n = 1.96² × 0.25 ÷ 0.05² = 384.16, so you need 385 responses.
If the population is only 1,000 people, the adjusted sample is 384.16 ÷ (1 + 383.16 ÷ 1,000) = 277.8, so 278.
For 99% confidence and a 3% margin of error, you need 1,844 responses.
To estimate a mean with a standard deviation of 15 and a margin of error of 2 at 95% confidence, n = (1.96 × 15 ÷ 2)² = 216.1, so 217.
Planning a survey
- The sample size is the number of completed responses you need, not the number of invitations. Divide by your expected response rate to find how many people to contact.
- Halving the margin of error needs about four times the sample.
- The population size matters only when your sample is a large share of it, roughly over 5%.
- Random sampling is assumed. A biased sample stays biased however large it is.
Frequently asked questions
What sample size do I need for a survey?
For 95% confidence and a 5% margin of error, about 385 responses, for any large population.
What does margin of error mean?
It’s the range around your result in which the true value is likely to lie. A 5% margin means a result of 60% is likely to be between 55% and 65%.
What confidence level should I choose?
95% is the standard. Use 99% when mistakes are costly, and 90% for quick, low-stakes studies.
Why use 50% for the expected proportion?
It gives the largest required sample, so it is a safe choice when you don’t know what to expect.
Does population size matter?
Only for small populations. Above about 20,000, the required sample barely changes.