Sample Size Calculator
How many people to survey, or measurements to take, for a chosen margin of error and confidence level, rounded up.
Result
Sample size needed: 385 responses
Rounded up, since a fraction of a response is not possible. Plan for people who do not reply.
- Before rounding up
- 384.145882
- Critical value, z*
- 1.959964
- Margin this sample achieves
- 4.9945%
https://calcgallery.com/statistics/sample-size-calculator/
Results follow the mathematical operation and values shown. Check that you selected the intended operation, convention and dataset type before relying on the result. Read the full disclaimer
How to use the Sample Size Calculator
- Choose a sample for a proportion, such as the share answering yes, or for a mean.
- Enter the confidence level and the margin of error you can accept. For a proportion, leave the expected proportion at 50% unless you have a good estimate.
- If you are surveying a small group, enter its size. Read the number of responses needed, rounded up.
The formulas
proportion n = z*² × p(1 − p) ÷ E²mean n = (z* × σ ÷ E)²small group n ÷ (1 + (n − 1) ÷ N)
E is the margin of error you want and z* the critical value for your confidence level: 1.960 for 95%. The result is always rounded up, after the population correction and not before.
Common sample sizes
At 50% and without a population correction:
| Confidence | ±5% | ±3% | ±1% |
|---|---|---|---|
| 95% | 385 | 1,068 | 9,604 |
| 99% | 664 | 1,844 | 16,588 |
Halving the margin of error takes four times the sample, which is why very precise surveys are expensive.
Checked in both directions
Every sample size this page reports can be put back into the margin of error calculator, and the margin it gives is at or within the one you asked for. The two pages share one formula, so they cannot drift apart.
For a mean
To estimate an average, you need a guess at the standard deviation, from a pilot study or earlier research. The page uses the normal critical value, the standard planning formula. The t value would need the sample size you are solving for, and for any sample worth planning the difference is small.
With your numbers
- n = 1.959964² × 0.5 × (1 − 0.5) ÷ 0.05² = 384.145882
- Rounded up: 385
Quick reference
Rounded up, since a fraction of a response is not possible. Plan for people who do not reply.
| Example | Sample size needed |
|---|---|
| 95%, ±5% | 385 |
| 95%, ±3% | 1,068 |
| 99%, ±5% | 664 |
| 95%, ±5%, population 1,000 | 278 |
| 95%, ±1% | 9,604 |
| Mean within ±2, SD 10, 95% | 97 |
Common questions about the Sample Size Calculator
- Why is the answer 385 and not 384?
- Because the formula gives 384.15 for 95% confidence and ±5%, and a sample of 384 would fall just short of that margin. A sample size always rounds up, the same as buying bags of concrete: you cannot survey 0.15 of a person. A page that reports 384 has rounded the wrong way.
- Do I need a bigger sample for a bigger population?
- Barely, once the population is large. The same 385 responses give ±5% at 95% for a town or a country. Only when the population is small does it matter: for a group of 1,000, 278 responses are enough, because they are already more than a quarter of everyone.
- Is this the number of people I should contact?
- No, it is the number of responses you need. If you expect one in five people to reply, contact five times as many. Plan for the people who will not answer, and remember that a low response rate can bias the result in ways no sample size fixes.
- What if I do not know the expected proportion?
- Leave it at 50%. That value needs the largest sample, so the result is safe whatever the true proportion turns out to be. If you are confident the answer will be far from 50%, say around 10%, entering that gives a smaller sample.