Skip to content

Confidence Interval Calculator for a Mean (z, Known σ)

A 90%, 95% or 99% confidence interval for a population mean from a sample mean, standard deviation and sample size, working shown.

Inputs

90% CI
[67.1775, 68.8225]

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 Confidence Interval for a Mean input means

Sample mean
The sample mean, x̄ — the average of your observations.
Std dev
The population standard deviation σ if known; otherwise the sample's, which is fine for samples of about 30 or more.
Sample size
The number of observations in the sample.
Confidence
The confidence level: 90%, 95% or 99%, with z = 1.645, 1.96 or 2.576. 95% is what nearly every report means.

Confidence Interval for a Mean formula

CI = x̄ ± z × σ ÷ √n · z = 1.645 (90%), 1.96 (95%), 2.576 (99%) · error bound EBM = z × σ ÷ √n

xˉ±zα/2 σn\bar{x} \pm z_{\alpha/2}\, \frac{\sigma}{\sqrt{n}}

A sample mean is an estimate of the population mean, and a confidence interval is that estimate with its uncertainty attached. The uncertainty comes from the standard error, σ ÷ √n — sample means scatter less than individual values, and the scatter shrinks with the square root of the sample size. Multiplying the standard error by a z value gives the error bound: 1.96 standard errors either side captures the true mean in 95% of samples, 1.645 in 90%, 2.576 in 99%. The interval is the sample mean plus and minus that bound. This is the z-interval, which assumes the population standard deviation is known or the sample is large enough (about 30 or more) that the sample standard deviation stands in for it; with a small sample and an estimated σ, the t-interval is wider and is the right one.

Confidence Interval for a Mean worked example

OpenStax's Example 8.2: exam scores with σ = 3, a sample of 36 with mean 68, at 90% confidence. The standard error is 3 ÷ √36 = 0.5; the error bound is 1.645 × 0.5 = 0.8225; the interval is 68 ± 0.8225 = (67.18, 68.82). At 95% the bound would be 1.96 × 0.5 = 0.98, giving (67.02, 68.98) — more confidence costs a wider interval. Doubling the sample to 144 halves the standard error and the bound.

More Confidence Interval for a Mean examples

A sample of 30 with mean 50 and standard deviation 12, at 95%: the standard error is 12 ÷ √30 = 2.1909, the bound is 1.96 × 2.1909 = 4.2941, and the interval is [45.7059, 54.2941].

Heights of 100 adults with mean 172 cm and standard deviation 8 cm, at 99%: 2.576 × 0.8 = 2.0608, giving [169.9392, 174.0608] — about 170 to 174 cm.

Where the Confidence Interval for a Mean calculator can give the wrong answer

  • '95% confidence' is about the procedure, not this interval: 95% of intervals built this way contain the true mean. It does not mean there is a 95% probability the true mean is in this particular interval, though that is how everyone reads it.
  • With the standard deviation estimated from a small sample (under about 30), use a t-interval instead; this page's z-interval is too narrow in that case, and noticeably so below n = 15.
  • The formula assumes a random sample and, for small n, a roughly normal population. A convenience sample or a heavily skewed variable breaks the guarantee regardless of the arithmetic.
  • The width shrinks with the square root of n, so it takes four times the sample to halve the interval — which is why the page shows the n that would do it.
  • Only 90%, 95% and 99% are offered because those are the z values every textbook tabulates; other levels need the inverse normal, and 95% is what nearly every report uses.

Spotted a mistake? Tell us

Confidence Interval for a Mean reference table

Error bound for a standard deviation of 10, by sample size and confidence level
Sample sizeStandard error90%95%99%
103.162±5.20±6.20±8.15
301.826±3.00±3.58±4.70
1001.000±1.65±1.96±2.58
4000.500±0.82±0.98±1.29
1,0000.316±0.52±0.62±0.81
Source: Arithmetic: z × σ ÷ √n with σ = 10; scale the bounds in proportion for any other standard deviation

Confidence Interval for a Mean FAQ

Sample mean ± 1.96 × (standard deviation ÷ √sample size). A mean of 50 with SD 12 and n = 30: 12 ÷ √30 = 2.19, 1.96 × 2.19 = 4.29, so the interval is 50 ± 4.29 = (45.71, 54.29). Enter the three numbers above and the page shows each step.