Confidence Interval Using Normal Distribution Calculator

Compute a confidence interval for a population mean using the Z-distribution

Overview

This calculator computes the confidence interval for a population mean using the normal distribution (the "Z-interval"). Enter your sample size, sample mean, known population standard deviation, and desired confidence level to get the margin of error and the lower/upper bounds.

Use this calculator when: the population standard deviation \( \sigma \) is known AND (the population is normal OR the sample size is large, \(n \ge 30\)). If \( \sigma \) is unknown, use the t-distribution calculator.

Interactive Confidence Interval Calculator

Enter your parameters. Sample size must be a positive integer; confidence level must be strictly between 0 and 100.

Results


Definition & Formula

For a sample of size \(n\) from a population with known standard deviation \( \sigma \), the \( (1-\alpha)\cdot 100\% \) confidence interval for the population mean \( \mu \) is:

Confidence Interval Formula

\[ \bar X \;\pm\; Z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} \]

Equivalently, as an interval:

\[ \left[\; \bar X - Z_{\alpha/2} \frac{\sigma}{\sqrt n} \;\;,\;\; \bar X + Z_{\alpha/2} \frac{\sigma}{\sqrt n} \;\right] \]

The quantity \( Z_{\alpha/2} \cdot \sigma/\sqrt{n} \) is the margin of error. Here \( \alpha = 1 - \text{confidence level} \), so for a 95% interval \( \alpha = 0.05 \) and \( \alpha/2 = 0.025 \).

Common critical values of \( Z_{\alpha/2} \)

Common Z critical values for confidence intervals
Confidence level \( \alpha \) \( Z_{\alpha/2} \)
90%0.101.6449
95%0.051.9600
99%0.012.5758
99.9%0.0013.2905

Graphical Interpretation

On the standard normal curve, the confidence level is the central area between the lower and upper bounds. The remaining probability \( \alpha \) is split equally between the two tails (each tail has area \( \alpha/2 \)):

Standard normal curve with the central confidence band between two critical Z-values; the two equal tails together make up α
Figure 1 — Confidence level as the central area; the two equal tails sum to \( \alpha \).

What "95% confidence" means. It doesn't mean a 95% chance that a given interval contains \( \mu \). It means that if we drew many independent samples of size \( n \) and built a CI from each one, about 95% of those intervals would contain the true \( \mu \). The "95%" describes the long-run behavior of the procedure, not any single interval.


Worked Example — 95% CI for a Mean

A sample of \( n = 40 \) observations has mean \( \bar X = 5 \), drawn from a normally distributed population with known \( \sigma = 2.5 \). Compute the 95% confidence interval for \( \mu \).

View solution

Step 1 — Find the critical value. For 95% confidence, \( \alpha = 0.05 \) and \( \alpha/2 = 0.025 \).

\[ Z_{0.025} \approx 1.9600 \]

Step 2 — Compute the standard error.

\[ \text{SE} = \frac{\sigma}{\sqrt{n}} = \frac{2.5}{\sqrt{40}} \approx 0.39528 \]

Step 3 — Compute the margin of error.

\[ \text{MOE} = Z_{0.025} \cdot \text{SE} = 1.96 \cdot 0.39528 \approx 0.77476 \]

Step 4 — Build the interval.

\[ [\, 5 - 0.77476,\;\; 5 + 0.77476 \,] \approx [\,4.2252,\;\; 5.7748\,] \]

Answer: we are 95% confident that the population mean lies between about 4.225 and 5.775.


Practice Problems

Practice 1 — Compute a 90% CI

A sample of size \( n = 100 \) has \( \bar X = 50 \). The population is normally distributed with known \( \sigma = 10 \). Compute the 90% CI for \( \mu \).

Answer

\( Z_{0.05} \approx 1.6449 \), SE = \( 10/\sqrt{100} = 1 \), MOE = \( 1.6449 \).

\[ \text{CI} \approx [\,48.355,\;\; 51.645\,] \]

Practice 2 — How large an \(n\)?

With \( \sigma = 10 \) and a target margin of error of 2 at 95% confidence, what sample size is needed?

Answer

Solve \( Z_{0.025} \cdot \sigma/\sqrt{n} \le 2 \):

\[ 1.96 \cdot \frac{10}{\sqrt{n}} \le 2 \;\Rightarrow\; \sqrt{n} \ge \frac{19.6}{2} = 9.8 \;\Rightarrow\; n \ge 96.04 \]

So \( n = 97 \) is the minimum integer.

Practice 3 — Effect of confidence level

For the same sample (n = 40, x̄ = 5, σ = 2.5), compute the 99% CI and compare its width to the 95% CI.

Answer

\( Z_{0.005} \approx 2.5758 \), MOE = \( 2.5758 \times 0.39528 \approx 1.0183 \).

\[ \text{99\% CI} \approx [\,3.9817,\;\; 6.0183\,] \]

The 99% CI is wider than the 95% CI (\(2.0367\) wide vs. \(1.5495\)), reflecting the trade-off: higher confidence → wider interval.

Frequently Asked Questions

What is the formula for a confidence interval using the normal distribution?

\( \bar X \pm Z_{\alpha/2} \cdot \sigma/\sqrt{n} \), where \( \bar X \) is the sample mean, \( \sigma \) is the known population standard deviation, \( n \) is the sample size, and \( Z_{\alpha/2} \) is the critical value from the standard normal distribution.

When should I use the Z-distribution vs. the t-distribution?

Use the Z-distribution when \( \sigma \) is known and either the population is normal or \( n \ge 30 \). Use the t-distribution when \( \sigma \) is unknown and must be estimated from the sample — the more common case in practice.

What does "95% confidence" actually mean?

It means that if we drew many independent samples of size \( n \) and built a CI from each, about 95% of those intervals would contain the true \( \mu \). The "95%" describes the long-run behavior of the procedure, not any single interval.

How can I narrow the confidence interval?

Three levers: (1) collect a larger sample — MOE scales as \( 1/\sqrt{n} \); (2) reduce the confidence level (90% CI is narrower than 99%); (3) reduce \( \sigma \) — usually impossible, since it's a population property. Larger \( n \) is the most practical lever.

Related Statistical Calculators & Resources

Last updated: October 20, 2026