Confidence interval calculator
Type the sample mean, standard deviation and sample size, choose a confidence level, and get the interval with its margin of error, standard error and critical value.
- Standard error: 8.2 ÷ √36 = 1.36667
- Critical value for 95% confidence: t* (35 degrees of freedom) = 2.03011
- Margin of error: 2.03011 × 1.36667 = 2.77448
- Interval: 72.5 ± 2.77448, which is 69.7255 to 75.2745
Read it as: if you repeated this sampling many times, about 95% of intervals built this way would contain the true mean. It doesn’t mean 95% of the data falls inside.
How to use it
- 1Type the sample mean, standard deviation and sample size.
- 2Choose the confidence level. 95% is the most common.
- 3Say whether the standard deviation came from your sample (uses t) or is known for the whole population (uses z). In practice it almost always comes from the sample.
The formula
A confidence interval for a mean is mean ± critical value × standard error, where the standard error is the standard deviation divided by √n.
The critical value depends on the level. For z these are 1.645 for 90%, 1.960 for 95% and 2.576 for 99%. For t they are slightly larger, by an amount that depends on the sample size, which accounts for the extra uncertainty of estimating the standard deviation.
A worked example
A sample of 36 has mean 72.5 and standard deviation 8.2. The standard error is 8.2 ÷ √36 ≈ 1.367. With 35 degrees of freedom, the 95% critical value is t* ≈ 2.030, so the margin of error is about 2.775. The interval runs from about 69.73 to 75.27.
What the interval means
A 95% interval means the method captures the true mean 95% of the time across repeated samples. Any one interval either contains the true mean or doesn’t; the 95% describes the procedure, not this particular result.
It is also not a range holding 95% of the data. With a large sample, the interval becomes very narrow even though the data stays just as spread out.
What makes an interval narrower
Three things control the width: more data (a larger n, though quadrupling n only halves the width), less variable data, and a lower confidence level. A 99% interval is wider than a 95% one from the same data, because being more sure requires a wider net.
Frequently asked questions
Should I use t or z?
What is the margin of error?
Why is 95% so common?
Does this work for proportions?
Related tools and guides
Value to z-score, z-score to percentile, and back.
P-values from data or statistics, shaded on the distribution.
Sample or population, with variance, every step and a histogram.
Probabilities, z-scores and percentiles, shaded on the bell curve.
Linear, polynomial, exponential or any custom model, with error bars.
It opens instantly, with no account and nothing to install.