A range for the true value
A confidence interval gives a range that, at a chosen confidence level such as 95%, is expected to contain the true value for the whole population. It is written as the sample result plus or minus a margin of error.
This calculator builds the interval for a sample mean, using the normal (z) distribution when the population standard deviation is known and Student's t distribution when it is estimated from the sample, and for a proportion using the more reliable Wilson score interval.
How it is calculated
Worked example
Mean 50, SD 8, n = 40, 95% confidence
- Standard error
- 1.2649
- t critical value (39 df)
- 2.0227
- Margin of error
- 2.56
- Interval
- 47.44 to 52.56
What affects the width
- A larger sample makes the interval narrower.
- Higher confidence (99% instead of 95%) makes it wider.
- More variable data (a larger standard deviation) makes it wider.
A 95% interval does not mean there is a 95% chance the true value is inside this one interval. It means 95% of intervals built this way would contain the true value.

