
Sample Size Calculator
Free sample size calculator for surveys and research. Enter confidence level, margin of error, and population size to get the responses you need.
There was an error with your calculation.
Sample Size
385
Margin of Error
9.8%
Sample size calculator at a glance#
A sample size calculator works out how many responses a survey needs for a chosen confidence level and margin of error. For a large population the formula is n = (Z² × p × (1 - p)) / e², where Z is the z-score for your confidence level, p is the expected proportion, and e is the margin of error as a decimal.
For example, at 95% confidence the z-score is 1.96. Using p = 0.5 (which gives the largest, safest sample) and a 5% margin of error (e = 0.05): n = (1.96² × 0.5 × 0.5) / 0.05² = 0.9604 / 0.0025 ≈ 385.
| Confidence Level | Margin of Error 5% | Margin of Error 3% |
|---|---|---|
| 90% (Z = 1.645) | 271 | 752 |
| 95% (Z = 1.96) | 385 | 1068 |
| 99% (Z = 2.576) | 664 | 1844 |
The figures above use p = 0.5 and are rounded up, since you cannot survey a fraction of a person. A higher confidence level or a smaller margin of error both raise the sample you need. If you survey a small, known population, the result is adjusted downward with a finite population correction.
The four inputs#
A sample size depends on four numbers. Confidence level is the chance the sample reflects the population, usually 95%, which fixes the z-score at 1.96. Margin of error is how far the result may sit from the true value, often 5%. Population proportion is the share you expect to give a particular answer; use 0.5 when it is unknown, because that produces the largest, safest sample. Population size is the total group you are sampling from, and it only matters when the group is small.
Worked example: a small population#
The at-a-glance formula assumes a large population and gives 385 at 95% confidence with a 5% margin of error. When the group is small, apply the finite population correction, which lowers the number. For 2,000 customers at the same 95% confidence and 5% margin of error with p = 0.5, the corrected sample size is 323. So a survey of those 2,000 customers needs 323 responses, not 385, to generalize with 95% confidence and a 5% margin of error.
Why 50% is the default proportion#
The proportion p appears in the formula as p × (1 - p), which is largest when p = 0.5, giving 0.25. Any other value, like 0.3 or 0.8, makes that product smaller and lowers the required sample. When you do not yet know the split, using 0.5 guarantees the sample is large enough for any outcome.
Sample size FAQ#
How does the confidence level change the sample size?#
A higher confidence level uses a larger z-score, which raises the sample. At a 5% margin of error with p = 0.5, 90% confidence needs 271, 95% needs 385, and 99% needs 664.
How does the margin of error change the sample size?#
A smaller margin of error needs a larger sample, because the margin is squared in the denominator. At 95% confidence with p = 0.5, a 5% margin needs 385 responses while a 3% margin needs 1,068.
What happens if the required sample is larger than the population?#
It means you should survey everyone, a census, rather than a sample. The finite population correction handles this by capping the number at the population size.
What is the difference between sample size and minimum sample size?#
Sample size is the number of responses in your study. Minimum sample size is the smallest number that still meets your chosen confidence level and margin of error; the calculator returns that minimum.