Confidence Interval Calculator
This tool lets you determine a confidence interval or its margin of error, based on the assumption that the sample mean approximates a normal distribution. If you only have raw observations, head over to the Standard Deviation Calculator.
What is the confidence interval?
A confidence interval provides a statistical band that likely contains an unknown parameter. When the target is the population mean, the interval gives a plausible range for that mean.
Confidence intervals are built from sample data and calculated at a pre‑chosen confidence level (e.g., 95%). This level reflects how trustworthy the method is, not the chance that a single interval encloses the true value. In fact, the confidence level tells us that, over countless independent experiments, the proportion of intervals that would capture the true parameter equals the chosen level.
Take 100 intervals computed at a 95% confidence level: we expect about 95 of them to contain the true parameter, but we cannot claim a 95% probability for any one specific interval. The interval either does or does not include the real value; the probability statement applies only to the long‑run performance of the method, a point that many misinterpret.
Typically, a confidence interval is expressed as a central value ± a margin. The margin may be given as an absolute number, a percentage, or simply as the lower and upper limits. For instance, the following notations all represent the same interval:
20.6 ±0.887
or
20.6 ±4.3%
or
[19.713 – 21.487]
Calculating confidence intervals:
This calculator determines confidence intervals for data that follow a normal distribution when the mean is unknown but the standard deviation is known. It cannot handle cases where both the mean and the standard deviation are unknown.
To form a confidence interval you need the sample mean (̄X) and a standard deviation. If the population standard deviation is unavailable, the sample standard deviation s can be used provided the sample size exceeds 30, at which point s approximates σ. Depending on which deviation is known, the formula changes. Here we assume either σ is known or the sample is large enough that s ≈ σ, and thus we use the known‑σ equation.
| X̄ ± Z× | σ |
| √n |
In the formula, Z denotes the Z‑score corresponding to the selected confidence level, ̄X is the sample mean, σ is the standard deviation, and n is the number of observations. Below we illustrate the calculation for a 95% confidence level:
X = 22.8
Z = 1.960
σ = 2.7
n = 100
The confidence interval is:| 22.8 ±1.960× | 2.7 |
| √100 |
22.8 ±0.5292
Z-values for Confidence Intervals
| Confidence Level | Z Value |
| 70% | 1.036 |
| 75% | 1.150 |
| 80% | 1.282 |
| 85% | 1.440 |
| 90% | 1.645 |
| 95% | 1.960 |
| 98% | 2.326 |
| 99% | 2.576 |
| 99.5% | 2.807 |
| 99.9% | 3.291 |
| 99.99% | 3.891 |
| 99.999% | 4.417 |