Complete guide
Use the calculator above to compute confidence intervals for a sample mean or proportion at 90%, 95%, 99% or any custom confidence level. The interval quantifies the precision of a sample estimate — and turns a single number into an honest range that reflects sampling uncertainty.
What it is
What is confidence interval?
A confidence interval (CI) is a range of values that, given the sampling method, is expected to contain the true population parameter at a stated level of confidence. A 95% CI means that if you repeated the sampling many times, 95% of those intervals would contain the true value — not that there is a 95% chance the true value is inside this particular one.
Calculation logic
How the calculation works
For a mean: CI = x̄ ± z × (s ÷ √n), where x̄ is the sample mean, s the standard deviation, n the sample size, and z the critical value from the normal distribution at the chosen confidence level (1.96 for 95%). For a proportion: CI = p̂ ± z × √(p̂(1−p̂)/n).
Common mistakes
Watch-outs before using confidence interval
- Saying "there is a 95% chance the true value is in this interval" — that is a Bayesian statement, not what a frequentist CI means.
- Confusing confidence level (95%) with precision — a narrow CI at 90% may be more useful than a wide CI at 99%.
- Reporting a CI without the sample size — readers need n to judge the figure.
- Using the z formula when n is small (under 30); use the t-distribution instead.
- Comparing two CIs visually instead of running a proper hypothesis test on the difference.
What to do next
Turn the result into action
Use the CI width to decide whether your sample size is adequate. If the interval is wider than the difference you need to detect, increase the sample. Re-run after any process change to see if the new CI overlaps the old one.
What is a confidence interval?
A range of values that, given the sampling method, is expected to contain the true population parameter at the chosen confidence level (commonly 95%).
What does 95% confidence mean?
If you repeated the same sampling process many times, 95% of the intervals you produce would contain the true value. It is not a probability statement about this particular interval.
Should I use 90%, 95% or 99% confidence?
95% is the default. 90% gives narrower intervals (less rigour) and 99% gives wider intervals (more rigour). The right choice depends on the cost of being wrong.
How do you make a confidence interval narrower?
Increase the sample size — width shrinks proportional to 1/√n. Reducing variability or accepting lower confidence also narrows the interval.
When should I use t instead of z?
When the sample size is small (under 30) or the population standard deviation is unknown — which is most real cases. The t-distribution has heavier tails, giving slightly wider, more honest intervals.