Explanation
What this interval shows
A confidence interval for a mean is the sample mean plus or minus a margin of error. The margin is a critical value times the standard error σ/√n, so it shrinks as the sample grows and widens when you ask for more confidence.
How to use it
Enter the sample mean, the population standard deviation (σ, known in advance), the sample size and the critical value for the confidence level you want. Common two-sided values are 1.645 for 90%, 1.96 for 95% and 2.576 for 99%.
E = z* × σ / √n; interval x̄ − E to x̄ + E
| E | margin of error |
|---|---|
| x̄ | sample mean |
| σ | population standard deviation |
| n | sample size |
| z | critical value |
A 2-standard-error interval
| Sample mean | 100 |
|---|---|
| Population standard deviation | 10 |
| Sample size | 25 |
| Critical value | 2 |
| Result | 4 |
E = 2 × 10 ÷ √25 = 4; 100 − 4 = 96 and 100 + 4 = 104
A small sample of 9
| Sample mean | 20 |
|---|---|
| Population standard deviation | 6 |
| Sample size | 9 |
| Critical value | 2 |
| Result | 4 |
E = 2 × 6 ÷ √9 = 4; 20 − 4 = 16 and 20 + 4 = 24
A 1-standard-error margin
| Sample mean | 0 |
|---|---|
| Population standard deviation | 2 |
| Sample size | 4 |
| Critical value | 1 |
| Result | 1 |
E = 1 × 2 ÷ √4 = 1; 0 − 1 = -1 and 0 + 1 = 1
Diagram of this result
The diagram shows the sample mean on a number line with the interval shaded from the lower bound to the upper bound, one margin of error on each side.
The sample mean, the margin of error and both bounds are stated in text and come from the same calculation.
Common mistakes
Do not enter a sample standard deviation and treat the result as a t interval. A 95% level describes how often the method captures the true mean over repeated samples; it is not the probability that this particular interval contains it. Independent sampling matters.
Limits and assumptions
Assumes a known population σ, independent observations and a sample mean that is normally distributed or close to it for a large sample. Sample size 1 to 1,000,000; σ and the critical value above zero. It does not look up t critical values or check sampling assumptions. Inputs keep up to 30 significant digits and the calculation uses 50; only the displayed answer is rounded.
Sources
NIST Engineering Statistics Handbook, confidence limits for the mean: https://www.itl.nist.gov/div898/handbook/eda/section3/eda352.htm
Why is 1.96 used for 95%?
In a standard normal distribution, 95% of the area lies within 1.96 standard deviations of the centre (more precisely 1.959964). Using that multiplier on the standard error gives a two-sided 95% interval.