Skip to content
Toolcroft

Math Calculators

Confidence Interval Calculator

Calculate confidence intervals for a population mean. Supports 80%, 90%, 95%, and 99% confidence levels using z or t distributions.

Confidence Interval

[46.4215, 53.5785]

Margin of Error

+-3.5785

Critical Value

1.9600

Std Error

1.8257

What is a confidence interval?

A confidence interval (CI) gives a range of values within which the true population parameter is expected to fall with a given probability. A 95% CI means: if you repeated the sampling 100 times, about 95 of the resulting intervals would contain the true value.

CI = x̄ ± z × (σ / √n)
where:
  x̄ = sample mean
  z  = z-score for confidence level
  σ  = standard deviation
  n  = sample size

Common z-scores

Confidence levelz-score
90%1.645
95%1.960
99%2.576

Wider vs. narrower intervals

Larger sample sizes and lower confidence levels produce narrower (more precise) intervals. Smaller samples or higher confidence levels (e.g., 99%) produce wider intervals. There is always a tradeoff between precision and confidence.

When to use Student's t-distribution instead of z

The z-distribution assumes you know the population standard deviation and/or have a large sample (n ≥ 30). When the sample size is small (n < 30) and the population standard deviation is unknown, use the Student's t-distribution with n−1 degrees of freedom. The t-distribution has heavier tails than the normal distribution, producing wider intervals that account for the additional uncertainty of a small sample. As n increases, the t-distribution converges to the z-distribution.

Common misinterpretation

A 95% confidence interval does not mean "there is a 95% probability that the true population parameter lies in this interval." The parameter is fixed (not random); it either is or isn't in the interval. The correct frequentist interpretation: if you repeated this study an infinite number of times and computed a 95% CI each time, approximately 95% of those intervals would contain the true parameter. This is a subtle but important distinction. The Bayesian equivalent - a 95% credible interval - does support the probabilistic interpretation.

Sample size planning

To achieve a desired margin of error E at confidence level zα/2 with estimated proportion p:

n = (zα/2)² × p(1−p) / E²

For a 95% CI with ±5% margin of error and unknown proportion (use p = 0.5 for maximum sample size): n = (1.96)² × 0.25 / (0.05)² ≈ 384. This is why many polls use samples of ~400 to ~1,000: diminishing returns beyond ~1,000 make larger samples expensive for relatively little precision gain.