Confidence Interval Calculator

Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/6/2026

The confidence interval of a mean is calculated with mean ± z × (standard deviation ÷ √n). For a mean of 50, a standard deviation of 10, a sample of 25 observations and a confidence level of 95%, the interval runs from 46.08 to 53.92.

Explanation

A confidence interval gives a range of plausible values for the true mean of a population, based on the data observed in a sample. It is built by adding and subtracting a margin of error from the observed mean, this margin being the product of a critical score (z, which depends on the chosen confidence level) and the standard error of the mean (the standard deviation divided by the square root of the sample size — a term closely related to the coefficient of variation, another way of expressing a sample's dispersion). A confidence level of 95% (the most commonly used) means that if the sampling were repeated a large number of times, about 95% of the intervals built this way would contain the true population mean — this is not the probability that the true mean lies within this specific interval, a nuance of interpretation that is frequently misunderstood. A higher confidence level (99%) gives a wider but more reliable interval, while a lower level (90%) gives a narrower but less reliable interval — a classic trade-off between precision and certainty.

Example: mean 50, standard deviation 10, sample of 25, 95% confidence

Inputs

Mean: 50. Standard deviation: 10. Sample size: 25. Confidence: 95%.

Calculation

Standard error = 10 ÷ √25 = 2. Margin of error = 1.96 × 2 = 3.92. Interval = 50 − 3.92 to 50 + 3.92, i.e. 46.08 to 53.92.

Result

With 95% confidence, the true population mean lies between 46.08 and 53.92.

Frequently asked questions

What does "95% confidence" actually mean?

It doesn't mean there is a 95% chance that the true mean lies within this specific interval. It means that the method used to build the interval produces, on average, an interval containing the true mean in 95% of cases if the sampling were repeated a large number of times. A subtle but important nuance in inferential statistics.

Where do the values 1.645, 1.96 and 2.576 come from?

These are the z-scores of the standard normal distribution that mark off 90%, 95% and 99% of the area under the curve, respectively, on either side of the mean. They are exact mathematical values (to the precision shown), not arbitrarily rounded approximations.

Why does the interval get narrower with a larger sample?

Because the standard error of the mean (the denominator of the margin of error) decreases with the square root of the sample size: a larger sample gives a more precise estimate of the true mean, which translates into a tighter confidence interval, for the same standard deviation and confidence level.

Related resources

Similar calculators