About the Confidence Interval Calculator
What is the Confidence Interval Calculator?
A confidence interval gives a range of plausible values for a population mean based on a sample. A 95% interval is built by a method that captures the true mean in 95% of samples, so it expresses both an estimate and its uncertainty.
Enter the sample mean, the sample standard deviation, the sample size and a confidence level. The calculator uses the Student t-distribution with n − 1 degrees of freedom, which is correct when the population standard deviation is unknown and becomes almost identical to the normal distribution for large samples.
How to use the Confidence Interval Calculator
- Sample Mean (x̄) (sample: 72.5)
- Sample Standard Deviation (s) — the standard deviation of your sample (the n − 1 version). (sample: 8.2)
- Sample Size (n) — the number of observations, at least 2. (sample: 40)
- Confidence Level (sample: 95%)
- Press Calculate Interval (results also refresh as you type). The result card shows the Confidence Interval, along with Margin of error (±), Standard error, Critical t value (df = 39) and Lower bound.
Formula used
CI = x̄ ± t* × s ÷ √n
- x̄ = the sample mean
- s = the sample standard deviation
- n = the sample size
- t* = the critical t value for the chosen confidence level and n − 1 degrees of freedom
- s ÷ √n = the standard error of the mean
The margin of error is t* × s ÷ √n. To halve it you need about four times as many observations.
Worked example
These are the sample values already filled in the calculator above, and the result it returns for them:
| Input | Sample value |
|---|---|
| Sample Mean (x̄) | 72.5 |
| Sample Standard Deviation (s) | 8.2 |
| Sample Size (n) | 40 |
| Confidence Level | 95% |
| Result | Value |
|---|---|
| Confidence Interval | 69.8775 to 75.1225 |
| Margin of error (±) | 2.6225 |
| Standard error | 1.2965 |
| Critical t value (df = 39) | 2.0227 |
| Lower bound | 69.8775 |
| Upper bound | 75.1225 |
Tips for using the Confidence Interval Calculator
- A higher confidence level gives a wider interval: 99% intervals are wider than 95% intervals from the same data.
- The interval says nothing about individual values — most individual observations fall well outside a confidence interval for the mean.
- The method assumes a random sample and roughly normal data, or a sample of 30 or more.
