Skip to content
FiftyCalc Free calculators for all 50 states

Sample Size Calculator

Test cases replayed : 4 of 4 match · Methodology · No outside source listed

Choose a confidence level and margin of error to find the minimum number of responses for estimating a proportion.

Result

Sample figures

Required sample size (rounded up)—

Critical value z —

  • Sample size for an unlimited population—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Sample Size Calculator

Confidence level: choose one of the 6 options in the list. Prefilled example: 95%.

Margin of error, in percent: enter 0 or more. Prefilled example: 5.

Expected proportion (%) (use 50 if unknown): enter a number from 0 to 100. Prefilled example: 50.

Population size (0 if very large or unknown): enter 0 or more. Prefilled example: 0.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Confidence level: choose one of the 6 options in the list.
  2. Margin of error, in percent: enter 0 or more.
  3. Expected proportion (%) (use 50 if unknown): enter a number from 0 to 100.
  4. Population size (0 if very large or unknown): enter 0 or more.
  5. Read the result: Required sample size (rounded up); the panel also shows Critical value z and Sample size for an unlimited population.

How this calculator works

Cochran's formula for a proportion: n₀ = z² × p × (1 − p) ÷ E², where z is the critical value of the confidence level, p the expected proportion and E the margin of error (both as decimals).

For a population of N people, the finite population correction gives n = n₀ ÷ (1 + (n₀ − 1) ÷ N). The result is rounded up to a whole response.

p = 50% gives the largest sample, so it is the safe choice when you have no prior estimate.

The formula

  1. Z=−norminv⁡(1−c2)
  2. N0=Z2×(p÷100)×(1−p÷100)(moe÷100)2
  3. N=ceil⁡({N01+(N0−1)÷popif pop>0N0otherwise)
Symbols used in the formula
SymbolMeaningUnit
cConfidence level
moeMargin of error%
pExpected proportion (%) (use 50 if unknown)
popPopulation size (0 if very large or unknown)
ZCritical value z
N0Sample size for an unlimited population
NRequired sample size (rounded up)
norminv(p, m, s)the value that a Gaussian variable with mean m and standard deviation s stays at or below with probability p (mean zero and standard deviation one without m and s).
ceil(x)the smallest whole number not below x.

Worked example

Confidence level95%
Margin of error5%
Expected proportion (%) (use 50 if unknown)50
Population size (0 if very large or unknown)0
Critical value z1.96
Sample size for an unlimited population384.1459
  1. Z=−norminv⁡(1−0.952)=1.95996
  2. N0=1.959962×(50÷100)×(1−50÷100)(5÷100)2=384.146
  3. N=ceil⁡(384.146)=385

Required sample size (rounded up) 385

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

How many survey responses do I need for 95% confidence and a 5% margin of error?

385 for a large population, using p = 50%. For a population of 10,000 people, 370 are enough.

Does a bigger population need a much bigger sample?

No. Past a few tens of thousands, the population size barely changes the required sample.

Questions answered

Related calculators