Sample Size Calculator

Find how many survey responses or test subjects you need for a given confidence level and margin of error — with optional finite population correction.

1,145 views

How Sample Size Is Calculated

The standard formula is n = Z² × p × (1−p) / e². Z is the z-score for your chosen confidence level — 1.96 for 95%, the most commonly used value, versus 1.645 for 90% and 2.576 for 99%. p is the proportion you expect to find; when you have no prior estimate, 0.5 is the standard choice because p × (1−p) is maximized at p = 0.5, which produces the largest — and therefore safest, most conservative — required sample. e is your margin of error, expressed as a decimal (5% = 0.05).

Concretely: for a 95% confidence level (Z = 1.96), an unknown proportion (p = 0.5) and a 5% margin of error, n = 1.96² × 0.5 × 0.5 / 0.05² = 3.8416 × 0.25 / 0.0025 = 384.16, rounded up to 385 respondents — the number behind most "±5%, 95% confidence" surveys you see quoted. Tightening the margin of error to 3% instead pushes the same calculation to roughly 1,067 respondents, because e is squared in the denominator: halving the margin roughly quadruples the required sample.

If the total population is known and relatively small, a finite population correction reduces that number further: n_adjusted = n / (1 + (n−1)/N). For the 385-respondent example above, if the entire population is only 1,000 people, the adjusted sample size drops to 385 / (1 + 384/1000) = 385 / 1.384 ≈ 278 respondents — noticeably fewer, because surveying a large share of a small population already captures most of the variation that exists.

What to Know

The 50% default for p is deliberately the most conservative assumption available — if you already have solid prior data suggesting the true proportion is closer to, say, 20% or 80%, plugging that in will lower the required sample, since p × (1−p) shrinks the further p moves from 0.5. The finite population correction only matters once the population is small relative to the sample the standard formula demands; for anything in the tens of thousands or more, leave the population field blank — the standard formula already treats it as effectively infinite and the correction would barely move the result. None of this accounts for response bias, question wording or how representative your recruitment method actually is — a mathematically sufficient sample size still produces a misleading result if the respondents themselves are not representative of the population you are trying to describe.

Frequently Asked Questions

Why default to 50% expected proportion?

50% (p=0.5) maximizes p×(1−p), which gives the largest, most conservative required sample size — safe when you have no prior estimate of the true proportion. Any other assumed value would only lower the required sample.

Why does cutting the margin of error in half roughly quadruple the required sample?

Margin of error (e) appears squared in the denominator of the formula, so the required sample scales with 1/e². Halving e from 5% to 2.5% multiplies the required sample by roughly 4 — tighter precision gets expensive fast.

Do I need the population size?

Only if it's relatively small (a few thousand or less) and known. For large or unknown populations (e.g. "all adults in a country"), leave it blank — the standard formula already assumes an effectively infinite population and the finite population correction would barely change the result.

What confidence level should I pick?

95% is the most common default for surveys and research, corresponding to Z=1.96. 99% is stricter (larger sample, more certainty, Z=2.576); 90% is looser (smaller sample, less certainty, Z=1.645).

If my sample size is mathematically sufficient, are my results guaranteed accurate?

No — the formula only accounts for random sampling error, not bias. A perfectly sized sample recruited through a non-representative channel, or a survey with leading questions, can still produce misleading results regardless of how large n is.

Comments

No comments yet — be the first to write one!

Similar Tools