Confidence Interval Calculator
Estimate the range likely to contain the true population mean, based on a sample mean, its standard deviation and the number of observations.
| Lower limit | 69.1152 |
|---|---|
| Upper limit | 75.8848 |
| Margin of error (±) | 3.3848 |
| Standard error | 1.64 |
| Critical value | 2.0639 |
Link to this calculation – copied!
Formula
CI = x̄ ± z* × σ ÷ √n (σ known)
| Symbol | Meaning |
|---|---|
| x̄ | Sample mean |
| s, σ | Sample or known population standard deviation |
| n | Sample size |
| t*, z* | Critical value for the confidence level (t uses n − 1 degrees of freedom) |
How to Use This Calculator
- Enter the Sample mean (x̄).
- Enter the Standard deviation.
- Enter the Sample size (n).
- Enter the Confidence level (%).
- Choose the Standard deviation is (From the sample (use t distribution), Known for the population (use z)).
- Press Calculate. Results also update automatically as you type.
Worked Example
Using the values pre-filled in the calculator above:
| Sample mean (x̄) | 72.5 |
|---|---|
| Standard deviation | 8.2 |
| Sample size (n) | 25 |
| Confidence level | 95 % |
| Standard deviation is | From the sample (use t distribution) |
| Lower limit | 69.1152 |
|---|---|
| Upper limit | 75.8848 |
| Margin of error (±) | 3.3848 |
| Standard error | 1.64 |
| Critical value | 2.0639 |
About This Calculation
A confidence interval gives a range of plausible values for an unknown population mean, rather than a single best guess. For example, if 25 bags of coffee from a production line average 72.5 g with a standard deviation of 8.2 g, a 95% interval of about 69.1 g to 75.9 g tells you where the true average fill weight most likely lies.
The width depends on three things: the variability of the data, the sample size, and the confidence level. More data narrows the interval in proportion to √n, while demanding higher confidence widens it. When the standard deviation is calculated from the sample itself, which is almost always the case, the t distribution is used; it has heavier tails than the normal curve to account for the extra uncertainty, especially with small samples. With large samples, t and z give practically the same answer.
A common misreading is that there is a 95% probability the true mean lies inside this particular interval. Strictly, the 95% describes the method: if you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean. The interval also assumes a random sample and roughly normal data or a reasonably large n; strong skew or outliers in a small sample can make it unreliable.
Frequently Asked Questions
- Should I use t or z?
- Use t when the standard deviation comes from your sample, which is the usual situation. Use z only when the population standard deviation is genuinely known in advance.
- Why does a higher confidence level give a wider interval?
- To be more certain of capturing the true mean you have to cast a wider net. A 99% interval is roughly 30% wider than a 95% interval from the same data.
- How do I get a confidence interval for a proportion?
- For survey percentages use the margin of error calculator and add and subtract the result from the observed proportion.