Confidence Interval Calculator

Free confidence interval calculator for a mean (t-based) or a proportion (Wald and Wilson). Enter your summary statistics and confidence level to get the interval instantly.

Compute a confidence interval for a mean or a proportion. Enter your summary numbers and confidence level; the mean interval uses the t-distribution, and the proportion interval reports both the classic Wald and the more reliable Wilson interval.

How to use it

Reading a confidence interval

A 95% confidence interval is a range built so that, across many repeated samples, 95% of such intervals would contain the true value. A wider interval means more uncertainty; a narrower one, more precision. It is not a 95% probability that the true value lies in this particular interval — that subtlety trips up a lot of write-ups (see our post on what “95% confidence” really means).

  • Mean: uses the t-distribution, correct for small samples where the population SD is unknown.
  • Proportion: the Wilson interval behaves far better than the textbook Wald interval, especially for small samples or proportions near 0 or 1 — prefer Wilson.

Do it in R

# mean: from summary stats
m <- 50; s <- 10; n <- 30
m + c(-1, 1) * qt(0.975, n - 1) * s / sqrt(n)

# proportion: Wilson
prop.test(40, 30 + 10, correct = FALSE)$conf.int

FAQ

Frequently asked questions

Wald or Wilson for a proportion?

Prefer Wilson. The Wald interval can extend below 0 or above 1 and has poor coverage for small samples or extreme proportions; Wilson fixes both problems.

Why the t-distribution for a mean?

Because you’re estimating the SD from the sample. The t-distribution has heavier tails than the normal, giving correctly wider intervals for small n; they converge as n grows.


Confidence intervals are only as good as the assumptions behind them. We check those for a living.