Sample Size: formula
The calculation assumes a random sample and ignores bias from who responds. If the population is small, a correction reduces the needed sample. Surveys of means rather than proportions need a different formula.
Statistical power for comparing groups requires another calculation.
Sample Size: worked example
| Desired margin of error | 5.0% |
|---|---|
| Confidence level | 95% |
| Estimated population proportion | 50.0% |
| Required sample size | 385 |
| Z-value used | 2 |
Enter the desired margin of error as a percentage, the z value for your confidence level, 1.96 for 95%, and the expected proportion, which is 50% when you have no idea, since that gives the largest sample. Use this for surveys where you are estimating a percentage. A smaller margin of error or higher confidence increases the required sample.
The population size matters only when the sample is a large share of it.
Sample Size: changing Desired margin of error
| Desired margin of error | Required sample size | Z-value used |
|---|---|---|
| 3.0% | 1,068 | 2 |
| 4.0% | 601 | 2 |
| 5.0% (example) | 385 | 2 |
| 6.0% | 267 | 2 |
| 7.0% | 196 | 2 |
Sample Size: compare input ranges
| Input | Tested from | To | Required sample size: low input | Required sample size: high input | Swing |
|---|---|---|---|---|---|
| Confidence level | 90% | 99% | 271 | 664 | 393 (102%) |
| Desired margin of error | 4.0% | 6.0% | 601 | 267 | 334 (87%) |
| Estimated population proportion | 48.0% | 52.0% | 384 | 384 | 0 |
Sample Size: individual input comparisons
| Input | Value | Required sample size | Z-value used |
|---|---|---|---|
| Desired margin of error | 3.0% | 1,068 | 2 |
| 4.0% | 601 | 2 | |
| 5.0% | 385 | 2 | |
| 6.0% | 267 | 2 | |
| 7.0% | 196 | 2 | |
| Confidence level | 90% | 271 | 1.6 |
| 95% | 385 | 2 | |
| 99% | 664 | 2.6 | |
| Estimated population proportion | 46.0% | 382 | 2 |
| 48.0% | 384 | 2 | |
| 50.0% | 385 | 2 | |
| 52.0% | 384 | 2 | |
| 54.0% | 382 | 2 |
Sample Size: combined input changes
| Desired margin of error / Estimated population proportion | 46.0% | 50.0% | 54.0% |
|---|---|---|---|
| 3.0% | 1,061 | 1,068 | 1,061 |
| 4.0% | 597 | 601 | 597 |
| 5.0% | 382 | 385 | 382 |
| 6.0% | 266 | 267 | 266 |
| 7.0% | 195 | 196 | 195 |
Sample Size: which assumptions move the result?
Sample Size: values and definitions
| Quantity and definition | Value used |
|---|---|
| Desired margin of error | 5.0% |
| Confidence level — How confident the result should be. | 95% |
| Estimated population proportion | 50.0% |
| Required sample size | 385 |
| Z-value used | 2 |
Common error: Assuming sample size scales in a straight line with precision. Wanting a margin of error half as wide isn't a modest ask; it's close to a fourfold increase in the respondents needed.
Statistics & Probability calculators: Binomial Probability Calculator, Normal Distribution Probability Calculator, P-Value from Z-Score Calculator, Expected Value Calculator, Bayes' Theorem Calculator, Mean & Median Calculator.
Cutting a margin of error in half doesn't double the sample size needed: it roughly quadruples it, because required sample size scales with the square of how tight the margin needs to be. A survey aiming for a very precise result can need dramatically more respondents than one accepting a looser estimate, out of proportion to how much tighter the target is.
Check the relationship between your target margin and the resulting sample size before committing to a survey budget: small precision gains get expensive fast.
See the interval that results on the confidence interval calculator, the normal distribution on the z-score and normal probability pages, and testing on the p-value calculator. The binomial probability page covers success counts, and the percentage calculator helps with reporting.
What does the 385 count assume?
It uses 1.96² × 0.5×0.5 / 0.05² = 384.16, rounded up, under a simple-random-sample normal approximation for a proportion.
Does 50% guarantee the requested coverage for every survey?
No. It maximizes p(1−p) in this formula, but sampling design, nonresponse and approximation accuracy still affect actual uncertainty.
Does halving the margin double the required sample?
No. The squared denominator makes it approximately four times as large before rounding, with other assumptions fixed.
Why does the sample size stop growing with the population?
Because the precision of a random sample depends mainly on its size, not on the population size, unless the sample is a large fraction of it.
What proportion should I use if I do not know it?
In the simple random-sample proportion formula, p(1−p) is largest at p = 0.5, so that assumption gives the largest calculated sample at a fixed confidence level and margin. Nonresponse, sampling design, bias and a misspecified population can still invalidate the intended precision.
How do I reduce the margin of error?
Increase the sample size. Cutting the margin of error in half requires four times as many responses, so precision gets expensive quickly.