Statisticsdrill

Confidence intervals and tests Updated November 2026

Margin of error

The margin of error is half the width of a confidence interval: critical value times standard error. For a proportion at 95% confidence it is 1.96 * sqrt(p(1 - p) / n); for a mean it is t * s / sqrt(n). A poll of 1,000 people has a margin of about 3 percentage points.

Syntax

ME = z * sqrt( p * (1 - p) / n )   or   ME = t * s / sqrt(n)
PartWhat it is
z or tthe critical value for the confidence level (1.96 for 95% with z)
pthe sample proportion (0.5 gives the largest margin)
nthe sample size

Examples

Poll: n = 1000, p = 0.5, 95%
ME = 1.96 * sqrt(0.25 / 1000) = 1.96 * 0.0158

Result: 0.031, about 3.1 percentage points

Mean: s = 10, n = 100, 95% (z)
ME = 1.96 * 10 / sqrt(100)

Result: 1.96

Excel: =CONFIDENCE.NORM(0.05, 10, 100)

Same poll at 99% confidence
ME = 2.576 * 0.0158

Result: 0.041, about 4.1 percentage points

Quadruple the poll to n = 4000 at 95%
1.96 * sqrt(0.25 / 4000)

Result: 0.0155, the margin halves

Common mistakes

  • Treating the margin of error as the full width of the interval; the interval runs from estimate minus ME to estimate plus ME.
  • Reading a 3-point margin as covering the gap between two candidates; the difference between two estimates has a larger margin, roughly double.
  • Expecting the margin to shrink in proportion to n; it shrinks with sqrt(n), so doubling the sample cuts it by only about 29%.

Practice Margin of error

These drills check your answer on live data, free, no account needed.

  • Margin of error for a mean (t)A random sample of 8 minutes customers waited on hold: 19, 14, 11, 9, 10, 6, 11, 15. What is the margin of error of a 90% confidence interval for the population mean, using the t distribution? Round to 2 decimal places.
  • Confidence interval for a proportionIn a random sample of 200 customers, 35 say they used the mobile app last month. What is the lower limit of a 99% confidence interval for the population proportion? Give it as a proportion. Round to 4 decimal places.

Questions

What is a good margin of error?

Many surveys aim for 3 to 5 percentage points at 95% confidence. Smaller margins cost more respondents: 2 points needs about 2,400 people, 1 point about 9,600.

Does population size matter for the margin of error?

Hardly, unless the sample is a sizable fraction of the population (above about 5%). A sample of 1,000 gives the same margin for a city or a country.

Related

  • Confidence interval for a proportionHow to calculate a confidence interval for a proportion with p-hat plus or minus z times sqrt(p(1 - p) / n), worked survey examples and the conditions.
  • Confidence interval for a meanHow to calculate a confidence interval for a mean with x-bar plus or minus t times s over root n, a full 95% example, when to use z, and Excel CONFIDENCE.T.
  • Sample sizeSample size formulas n = (z sigma / E)^2 for a mean and n = z^2 p(1 - p) / E^2 for a proportion, worked examples giving 97 and 385, and rounding rules.
  • Standard errorThe standard error of the mean is s / sqrt(n); for a proportion it is sqrt(p(1 - p) / n). Worked examples, SE versus standard deviation and the Excel formula.

Previous: Confidence interval for a proportionNext: Sample size