Skip to content
CalcGlass

Mathematics · Statistics

Confidence Interval Calculator — Mean or Proportion, Margin of Error

Find the confidence interval for a population mean from a sample's mean, standard deviation and size — using the t distribution, or z when the population SD is known — or for a proportion from the number of successes, with both the Wilson score and the simple normal (Wald) interval. Shows the margin of error and critical value.

Your inputs

Your result Live

95% Confidence Interval

69.7255 to 75.2745

72.5 ± 2.77448

Margin of Error
±2.77448
Standard Error
1.36667
Critical Value
t = 2.0301 with 35 degrees of freedom

How this is calculated

Mean: x̄ ± t(α/2, n−1) × s ÷ √n (z if σ known) · Proportion (Wilson): (p̂ + z²/2n ± z√(p̂(1−p̂)/n + z²/4n²)) ÷ (1 + z²/n)

α
1 − confidence level

A 95 % confidence interval is a range built so that, if you repeated the sampling many times, about 95 % of such ranges would contain the true value. It's the estimate plus or minus a margin of error: the critical value times the standard error. For small samples the t distribution's wider critical value allows for the extra uncertainty in s.

Assumptions & sources

  • Random, independent sample; for means, a roughly normal population or n of about 30 or more.
  1. 1NIST/SEMATECH e-Handbook of Statistical Methods — US National Institute of Standards and Technology
  2. 2Probable inference, the law of succession, and statistical inference (Wilson score interval) — E. B. Wilson, Journal of the American Statistical Association, 1927

Calculator ID MATH-CI-001 · version 1.0.0

Common questions

What's the 95 % CI for a mean of 72.5, SD 8.2, n = 36?

72.5 ± 2.030 × 8.2/6 = 72.5 ± 2.77, i.e. 69.73 to 75.27 (t with 35 df).

What's the margin of error for a poll of 1,000 people?

At most about ±3.1 % at 95 % confidence (when the result is near 50 %).

Why use t instead of z?

When the standard deviation comes from the sample itself, t accounts for that extra uncertainty; with large n the two are almost the same.