Confidence interval calculator
The confidence interval for a mean from the sample mean, standard deviation and size.
About this calculator
This confidence interval calculator gives the range that probably contains the true average, from a sample's mean, standard deviation and size.
Choose a confidence level from 80% to 99.9%. It uses the t distribution, which is right for small samples.
How it works
Confidence interval = mean ± t × s ÷ √n, where s is the standard deviation, n the sample size and t the critical value for your confidence level with n − 1 degrees of freedom.
Last reviewed:
Worked example
- Sample mean: 50
- Standard deviation: 8
- Sample size: 40
- Confidence level: 95%
Confidence interval: 47.441 – 52.559 (50 ± 2.559)
Common questions
What does a 95% confidence interval mean?
If you repeated the study many times, about 95% of the intervals worked out this way would contain the true mean. It doesn't mean there's a 95% chance for this one interval.
Why use t instead of z?
The t distribution allows for the extra uncertainty of estimating the standard deviation from a small sample. For large samples, t and z are almost the same.
How can I make the interval narrower?
Collect a bigger sample, or accept a lower confidence level. Quadrupling the sample size roughly halves the width.
Sources and further reading
The story behind it
Where the idea came from: The Polish statistician Jerzy Neyman introduced confidence intervals in 1937.
Neyman wanted a way to say how sure we can be about an estimate without pretending to know the answer. Confidence intervals are now standard in medical trials, polls and science of every kind.
Why you can trust this calculator
- It runs in your browser. Nothing you type into it is sent anywhere.
- The method is explained on this page, so you can check it yourself.
- Free to use, with no sign-up.
- Results are estimates, so please double-check anything important.
- Spotted a mistake? Tell us and we'll look into it.

After 15 years as a mathematics educator, I built CalculStore to give students, teachers, professionals and anyone working with numbers simple, reliable tools.
Meet the founder
