How the interval is calculated
Standard error = s ÷ √n Margin of error = critical value × standard error Interval = mean ± margin of errorFor the example, the standard error is 10 ÷ √100 = 1. The critical value for 95% is 1.96, so the margin of error is 1.96 and the interval is 48.04 to 51.96. A bigger sample gives a smaller standard error and a narrower interval, but the width shrinks with √n: to halve the margin of error you need four times the sample.
z or t?
| Situation | Use |
|---|---|
| Population σ known | z |
| σ estimated from the sample, n large (30 or more) | t (close to z) |
| σ estimated, n small | t with n − 1 degrees of freedom |
For n = 12, the 95% critical t value is 2.201, against 1.96 for z, so the interval is wider to allow for the extra uncertainty from estimating σ. With n over 100 the two nearly coincide.
Reading a confidence interval
A 95% confidence interval does not mean there is a 95% chance the true mean lies in this one interval. It means the method produces intervals that contain the true mean in 95% of repeated samples. Higher confidence gives a wider interval: 99% is wider than 95%. Use the sample size calculator to plan a study, the z-score calculator to explore critical values, and the standard deviation calculator to get s from data.
Complete guide to the Confidence Interval Calculator
How to use the Confidence Interval Calculator, step by step
- Enter the mean, standard deviation and sample size.
- Choose the confidence level.
- Choose z or t.
- Read the interval and margin of error.
Common mistakes to avoid
- Reading 95% as a probability for one interval.
- Using z for tiny samples.
- Confusing standard deviation with standard error.
Key terms explained
- Margin of error
- Half the width of the interval.
- Standard error
- The standard deviation of the sample mean.
- Critical value
- The multiplier for the confidence level.
- Degrees of freedom
- n − 1 for a single sample mean.
Want the full walkthrough? Read our guide: How Confidence Intervals and Sample Size Work.
Frequently asked questions
What is a confidence interval?
It is a range of values, computed from a sample, that is likely to contain the true population value. The confidence level says how often the method succeeds in repeated sampling.
What is the margin of error?
It is half the width of the interval: the critical value times the standard error. The result is usually quoted as the mean plus or minus the margin.
What does 95% confidence mean?
If you repeated the sampling many times, about 95% of the intervals built this way would contain the true value.
How does sample size affect the interval?
A larger sample reduces the standard error, so the interval narrows. The margin of error falls in proportion to 1 ÷ √n.
When should I use the t distribution?
Use t when you estimate the standard deviation from a small sample. It has heavier tails than z, giving a wider interval to reflect extra uncertainty.
Why is a 99% interval wider than a 95% one?
To be more confident of capturing the true value, you must accept a wider range. The critical value rises from 1.96 to 2.576.
Can I use this for proportions?
This tool is for means. For a proportion, the standard error is √(p(1 − p) ÷ n), and you can use the sample size calculator for planning.