Sample Size Calculator
Find how many responses a survey needs for a given margin of error and confidence level.
Formula and sources updated · Data sources · 1View algorithm, constants and default inputs (JSON)
Required sample size
Dots show recalculated samples. Other inputs stay fixed.
About this calculator
The required sample size depends almost entirely on how tight you want the estimate and how confident you want to be — not on how big the population is. That last part surprises people: a population of 100,000 and one of 100 million need nearly the same sample. The exception is small populations, where the finite population correction starts to matter.
Worked example
calculated with the default values below
Confidence level 95% · Margin of error 5 pp · Expected proportion 50 % · Population size (0 if unknown) 0 Required sample size 385 · Before finite population correction 385 · Correction factor 1.0000 · Worst-case sample size (50/50) 385
Method and assumptions
n0 = z²p(1 - p) ÷ e²; n = n0 ÷ (1 + (n0 - 1) ÷ N) Uses a two-sided normal z estimate for the selected confidence level and margin of error. The finite-population correction is applied to both the entered proportion and the worst-case 50% estimate when population is known; population 0 means unknown/large. Required counts are rounded up. The required sample size depends almost entirely on how tight you want the estimate and how confident you want to be — not on how big the population is. That last part surprises people: a population of 100,000 and one of 100 million need nearly the same sample. The exception is small populations, where the finite population correction starts to matter. The references provide context and limitations. They do not validate this page’s illustrative multipliers, lookup values or predictions.
Data sources
The references provide context and limitations. They do not validate this page’s illustrative multipliers, lookup values or predictions.
Disclaimer
These calculators give general mathematical results. They suit study, planning and estimation — verify anything that feeds a graded submission, a published figure or a financial commitment.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
n0 = z²p(1 - p) ÷ e²; n = n0 ÷ (1 + (n0 - 1) ÷ N)
- z
- Z-score for confidence
- p
- Expected proportion 0–1
- e
- Margin of error 0–1
- N
- Population (0 = unlimited)
- n
- Sample size
Uses a two-sided normal z estimate for the selected confidence level and margin of error. The finite-population correction is applied to both the entered proportion and the worst-case 50% estimate when population is known; population 0 means unknown/large. Required counts are rounded up.
Frequently asked questions
What assumptions does this estimate use?
The calculator uses a normal approximation for a population proportion, the selected confidence level, margin of error and expected proportion. When a population is entered, finite-population correction is applied to both the selected proportion and the 50% worst-case estimate. It assumes simple random sampling and excludes nonresponse, clustering and survey-design effects.
Which inputs and limits apply to Sample Size Calculator?
Use the units shown beside each field. These are form limits, not recommended settings. Margin of error: 0.5–20 pp; Expected proportion: 1–99 %; Population size (0 if unknown): 0–2,000,000,000 n0 = z²p(1 - p) ÷ e²; n = n0 ÷ (1 + (n0 - 1) ÷ N) Uses a two-sided normal z estimate for the selected confidence level and margin of error. The finite-population correction is applied to both the entered proportion and the worst-case 50% estimate when population is known; population 0 means unknown/large. Required counts are rounded up. The required sample size depends almost entirely on how tight you want the estimate and how confident you want to be — not on how big the population is. That last part surprises people: a population of 100,000 and one of 100 million need nearly the same sample. The exception is small populations, where the finite population correction starts to matter. The references provide context and limitations. They do not validate this page’s illustrative multipliers, lookup values or predictions.
What is a complete worked example for Confidence level = 95% %; Margin of error = 5 pp?
Inputs: Confidence level = 95% %; Margin of error = 5 pp; Expected proportion = 50 %; Population size (0 if unknown) = 0. Calculation: n0 = z²p(1 - p) ÷ e²; n = n0 ÷ (1 + (n0 - 1) ÷ N). Results: Required sample size = 385; Before finite population correction = 385; Correction factor = 1.0000; Worst-case sample size (50/50) = 385.