Data Sample Size Calculator
How Many Responses Does a Survey Actually Need?
Collecting more survey responses always narrows the margin of error, but with steeply diminishing returns — doubling the sample size doesn't halve the margin of error, it only shrinks it by a factor of about 1.4. Cochran's formula turns a target confidence level and margin of error into the specific number of responses needed to hit that target.
The Formula
Finite population correction: n = n0 / (1 + (n0−1) / N)
Z is the critical value for the chosen confidence level, p is the estimated proportion (50% is the most conservative assumption when unknown, since it maximizes p(1−p)), and e is the acceptable margin of error. When a finite population size N is provided, the correction reduces the required sample size accordingly.
Where This Matters
- Survey design — determining how many respondents are needed before results are considered statistically reliable.
- A/B testing groundwork — estimating minimum sample sizes for proportion-based tests.
- Market research — sizing a customer survey against a known total customer base using the finite population correction.
Standard Z-Values by Confidence Level
| Confidence level | Z-value |
|---|---|
| 90% | 1.6449 |
| 95% | 1.9600 |
| 98% | 2.3263 |
| 99% | 2.5758 |
At 95% confidence, 5% margin of error, and 50% assumed proportion, the required sample size for an unknown/infinite population is 385 — a widely cited reference figure in survey methodology. With a finite population of 1,000, the same inputs reduce the requirement to 278.
How to Use This Calculator
- Select the desired Confidence Level.
- Enter the Margin of Error (%) you're willing to accept.
- Enter the Estimated Proportion (%) — use 50% if unknown, as it's the most conservative assumption.
- Enter the Population Size if known, or leave at 0 to treat it as unknown/infinite.
- Select Calculate to get the required sample size.
Related Calculations
Once results come in, check how well a resulting model fits the data with the R-Squared Calculator, or evaluate a resulting classifier with the Confusion Matrix Calculator.