Confidence Interval Calculator
Build a confidence interval for a mean from your sample mean, standard deviation, and size.
Margin of error: ±5.368 (z = 1.96)
A confidence interval for a mean is x̄ ± z × (σ ÷ √n). For a mean of 100, σ = 15, n = 36, at 95% confidence (z = 1.96), the standard error is 15 ÷ 6 = 2.5 and the margin is 1.96 × 2.5 = 4.9, giving [95.1, 104.9].
What a confidence interval tells you
A confidence interval turns a single sample mean into a plausible range for the true population mean. A 95% interval means that if you repeated the sampling many times, about 95% of the intervals you built would contain the true mean. It is a statement about the long-run procedure, not a probability claim about any one interval you happen to have.
sample mean, plus or minus the margin of error
Worked example
Sample mean 100, standard deviation 15, sample size 36, at 95% confidence.
- 1 Compute the standard error. SE = σ ÷ √n = 15 ÷ √36 = 15 ÷ 6 = 2.5.
- 2 Multiply by the critical z. Margin of error = 1.96 × 2.5 = 4.9.
- 3 Add and subtract from the mean. 100 ± 4.9 = [95.1, 104.9].
Critical z-values by confidence level
The two-tailed normal critical value used in the margin of error.
| Confidence | Critical z | Tail area (each) |
|---|---|---|
| 90% | 1.645 | 0.05 |
| 95% | 1.960 | 0.025 |
| 99% | 2.576 | 0.005 |
Choosing inputs and reading the result
z-interval vs t-interval. Use the z critical values when the population SD is known or the sample is large (n ≥ 30). For small samples with an estimated SD, use the t-distribution instead, which gives slightly wider, more honest intervals.
Higher confidence widens the interval. To be more sure of capturing the true mean you must cast a wider net, so 99% intervals are wider than 95% ones from the same data.
Bigger samples tighten it. The margin of error shrinks with √n, so quadrupling the sample size roughly halves the width — the main lever you control. To find the n that hits a target margin before collecting data, use the sample size calculator.
What it does not mean. A 95% interval does not mean there’s a 95% chance the true mean lies in your specific interval; the true mean is fixed, and your one interval either contains it or it doesn’t.