Confidence Interval Calculator
Compute statistical confidence intervals and margins of error for sample means at 90%, 95%, and 99% confidence levels in your browser.
Confidence Interval
How do you compute a 95% confidence interval for a sample mean?
Multiply the critical z-value (1.96 for 95% with known σ) or Student t-value (t* for unknown σ) by the standard error (s / √n), then add and subtract that margin of error from sample mean x̄.
CI = x̄ ± z* × (s / √n)Frequently asked questions
What is a confidence interval?
A confidence interval is a range of estimates for an unknown parameter. It is computed at a designated confidence level, such as 95%.
What does a 95% confidence interval actually mean?
It means that if you repeated the sampling procedure many times, about 95% of the intervals constructed this way would contain the true population parameter. It does not mean there is a 95% probability that this particular interval contains it - that is a Bayesian credible interval, which requires a prior and is a different calculation.
When should I use a t-distribution instead of z?
Use t when the population standard deviation is unknown and you are estimating it from the sample, which is nearly always. The t-distribution has heavier tails to account for that extra uncertainty, and converges on the normal distribution as the sample grows - beyond about n=30 the difference is small but the t interval is still technically correct.
How do I make my confidence interval narrower?
Increase the sample size - the interval width shrinks with the square root of n, so quartering the width takes sixteen times the data. You can also accept a lower confidence level (90% gives a narrower interval than 99%), or reduce measurement variability. There is no way to have high confidence and a narrow interval from a small, noisy sample.