Skip to content
FiftyCalc Free calculators for all 50 states

Margin of Error Calculator

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

Enter the percentage found in your sample, the sample size and a confidence level to get the margin of error of a survey result.

Result

Sample figures

Margin of error (± percentage points)—

Critical value (z) —

  • Lower bound—
  • Upper bound—

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

Margin of Error Calculator

Sample percentage (50 if unknown), in percent: enter a number from 0 to 100. Prefilled example: 50.

Sample size: enter 1 or more. Prefilled example: 1,000.

Confidence level

Confidence level: choose 90%, 95%, 98% or 99%. Prefilled example: 95%.

Population size (0 if very large): 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. Sample percentage (50 if unknown), in percent: enter a number from 0 to 100.
  2. Sample size: enter 1 or more.
  3. Confidence level: choose 90%, 95%, 98% or 99%.
  4. Population size (0 if very large): enter 0 or more.
  5. Read the result: Margin of error (± percentage points); the panel also shows Critical value (z), Lower bound and Upper bound.

How this calculator works

Margin of error of a sample proportion: E = z × √(p̂(1 − p̂) ÷ n), where p̂ is the sample proportion, n the sample size and z the critical value of the standard normal distribution for the chosen confidence level (1.96 for 95%).

For a sample drawn from a small population of size N, the finite population correction multiplies E by √((N − n) ÷ (N − 1)). The interval p̂ ± E is the Wald interval; it assumes a simple random sample and covers sampling error only, not non-response or question wording.

p̂ = 50% gives the largest margin, which is why it is used when the result is not yet known.

The formula

  1. z=norminv⁡(1−1−c2)
  2. Moe=z×p÷100×(1−p÷100)n×{pop−npop−1if pop>01otherwise×100
Symbols used in the formula
SymbolMeaningUnit
pSample percentage (50 if unknown)%
nSample size
cConfidence level
popPopulation size (0 if very large)
zCritical value
MoeMargin of error (± percentage points)%
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).

Worked example

Sample percentage (50 if unknown)50%
Sample size1,000
Confidence level95%
Population size (0 if very large)0
Critical value (z)1.96
Lower bound46.9%
Upper bound53.1%
  1. z=norminv⁡(1−1−0.952)=1.95996
  2. Moe=1.95996×50÷100×(1−50÷100)1,000×1×100=3.09898

Margin of error (± percentage points) 3.1%

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

Frequently asked questions

What is the margin of error for 1,000 people at 95% confidence?

With p̂ = 50%: 1.96 × √(0.25 ÷ 1,000) ≈ 3.1 percentage points.

How does sample size affect the margin of error?

The margin shrinks with the square root of n: four times as many respondents halve it, so 4,000 people give about ± 1.55 points.

Questions answered

Related calculators