Skip to content
Calculated in the browser

Confidence interval

The margin of error gets tighter as the sample grows and the spread shrinks.

How it is calculated

The formula assumes the standard deviation is known and the sample is large enough. For a small n, a Student quantile is more accurate. It is not provided here.

Bound = mean ± z × s / √n

Where the numbers come from

  • Mean
  • Standard deviation
  • Sample size
  • Level

Example

A mean of 100, a deviation of 10, 25 observations, and 95% give an error of 1,96 × 10 / 5 = 3,92.

Questions

What z is used for 95%?

About 1,96.

Is s the spread of the mean or of the data?

The spread of the observations themselves. The calculator divides it by the square root of n.

Does the interval always cover the true value?

No. A level of 95% is the long-run rate of the method, not a guarantee for one sample.