Skip to content

Margin of Error Calculator (Mean, z-Interval)

The margin of error for a sample mean from the standard deviation, sample size and confidence level, working shown.

Inputs

Margin of error
±1.96

Use this calculator on your own site

Free embed

  • Two lines of HTML, unlimited views
  • Shows a small CalculateEveryday bar, with a credit link under the calculator

What each Margin of Error input means

Std dev
The standard deviation of the measurement — the population figure if known, or the sample's for a reasonably large sample.
Sample size
The sample size. The margin shrinks with its square root.
Confidence
The confidence level: 90%, 95% or 99%, with z = 1.645, 1.96 or 2.576. 95% is what nearly every report means.

Margin of Error formula

margin of error = z × σ ÷ √n · z = 1.645 (90%), 1.96 (95%), 2.576 (99%) · the confidence interval is the sample mean ± this

E=zα/2 σnE = z_{\alpha/2}\, \frac{\sigma}{\sqrt{n}}

The margin of error is how far a sample mean can plausibly be from the population mean at a chosen confidence level. It is the standard error, σ ÷ √n, scaled by a z value: 1.96 standard errors for 95%, 1.645 for 90%, 2.576 for 99%. The standard deviation sets the scale of the noise, the sample size shrinks it — by the square root, so four times the data halves the margin — and the confidence level sets how many standard errors count as 'plausibly'. OpenStax calls the same quantity the error bound. Reports that say 'accurate to within ±3 points, 19 times in 20' are quoting a 95% margin of error; the page also shows the sample size that would halve whatever margin it finds.

Margin of Error worked example

A standard deviation of 10 and a sample of 100 at 95% confidence: the standard error is 10 ÷ √100 = 1, and the margin is 1.96 × 1 = ±1.96. A sample mean of 50 would therefore be reported as 50 ± 1.96, or (48.04, 51.96). At 99% the margin is 2.576; with n = 400 it drops to ±0.98; with n = 25 it rises to ±3.92.

More Margin of Error examples

A standard deviation of 12 and 36 observations at 95%: 1.96 × 12 ÷ 6 = ±3.92.

Thirty observations with a standard deviation of 15 at 90%: 1.645 × 15 ÷ √30 = 1.645 × 2.7386 = ±4.505, and 120 observations would halve it.

Where the Margin of Error calculator can give the wrong answer

  • This is the margin for a mean with a known or well-estimated standard deviation. A poll percentage uses the proportion formula z × √(p(1 − p) ÷ n), which is where the familiar ±3% for n ≈ 1,000 comes from.
  • With a small sample and a standard deviation estimated from that sample, the t multiplier applies and the true margin is larger than the z figure here — about 15% larger at n = 10.
  • The margin covers sampling error only. A biased sample, a badly worded question or measurement error can put the truth outside the margin no matter how large n is.
  • Halving the margin needs four times the sample, because √n is in the denominator; the page shows that n.
  • Only 90%, 95% and 99% are offered — the three z values every text tabulates — and 95% is what almost every published margin means.

Spotted a mistake? Tell us

Margin of Error reference table

95% margin of error by sample size, for a mean and for a poll percentage
Sample sizeMean, standard deviation 10Percentage near 50%
25±3.92±19.6 points
50±2.77±13.9 points
100±1.96±9.8 points
200±1.39±6.9 points
400±0.98±4.9 points
1,000±0.62±3.1 points
1,067±0.60±3.0 points
Source: Arithmetic: 1.96 × 10 ÷ √n for the mean; 1.96 × √(0.25 ÷ n) for a proportion at 50%, the widest case

Margin of Error FAQ

Multiply the z value for your confidence level by the standard deviation and divide by the square root of the sample size. For SD 12, n = 36 and 95%: 1.96 × 12 ÷ 6 = 3.92. Enter the three values and the page shows the multiplication.