Z Table

Confidence Interval Calculator

A confidence interval is the sample estimate plus or minus a margin of error: x̄ ± critical value × standard error. For a sample mean of 50 with s = 10 and n = 25, the 95% t interval is 50 ± 2.064 × 2 = (45.87, 54.13). Choose a mean with σ unknown (t), a mean with σ known (z), or a proportion, enter your numbers and the confidence level, and the steps are shown.

For example 90, 95 or 99.

Lower limit

45.8722

Upper limit

54.1278

Margin of error

4.1278

Critical value

2.0639

Working

  1. Standard error = 10 ÷ √25 = 2
  2. t critical (df = 24, 95% two-sided) = 2.0639
  3. Margin of error = 2.0639 × 2 = 4.1278
  4. Interval = 50 ± 4.1278 = (45.8722, 54.1278)

Example: mean 50, s = 10, n = 25, 95% (t interval)

  • Standard error = 10 ÷ √25 = 2
  • t critical (df = 24, 95% two-sided) = 2.0639
  • Margin of error = 2.0639 × 2 = 4.1278
  • Interval = 50 ± 4.1278 = (45.8722, 54.1278)

Which interval to use

Mean, σ unknown: use the t interval with n − 1 degrees of freedom, the usual case for real data. Mean, σ known: use z, with the critical value 1.960 for 95%. Proportion: the calculator uses the normal-approximation (Wald) interval p̂ ± z × √(p̂(1 − p̂) ÷ n), which works when both the successes and failures are at least about 10; for small counts or proportions near 0 or 1 it can be inaccurate, and exact or Wilson intervals are better.

The critical value for a 95% interval is the point with 2.5% in each tail: z = 1.960, or t = 2.064 for 24 degrees of freedom. The z table and the t table list these values for other levels. A 99% interval is wider than a 95% one because it demands more confidence.

What a confidence interval means

A 95% confidence level means that if you repeated the sampling many times and built an interval each time, about 95% of those intervals would contain the true value. It does not mean there is a 95% probability that this particular interval holds the true mean. Intervals assume a random sample and, for small n, a roughly normal population.

Frequently asked questions

How do I calculate a 95% confidence interval?
Compute the standard error, multiply it by the critical value (1.960 for z, or t with n − 1 df) and add and subtract the result from the sample mean.
When do I use t instead of z?
Use t when the population standard deviation is unknown and estimated by s, which is nearly always. With large n the two are very close.
Does a wider interval mean a worse estimate?
A wider interval means less precision. Higher confidence, more variable data or a smaller sample all widen it.
Can I use the proportion interval for small samples?
The normal approximation needs at least about 10 successes and 10 failures. Otherwise use an exact or Wilson interval.

Sources and references