Confidence Interval Calculator
Enter a sample mean and standard deviation, or a count of successes, and get the interval, the margin of error and the critical value behind it.
Quick answer: For a sample mean of 50 with s = 8 and n = 25, the 95% confidence interval is 50 ± 2.0639 × 8 ÷ √25 = 50 ± 3.3022, i.e. 46.6978 to 53.3022.
Not rated yet · Updated · Free · No sign-up
Confidence Interval Calculator inputs
Result
95% confidence interval for the mean
46.6978 to 53.3022
50 ± 3.3022
- Margin of error
- ±3.3022
- Critical value t* (df = 24)
- 2.0639
- Standard error
- 1.6
Step by step
- Critical value for 95% confidence: t* (df = 24) = 2.0639
- Standard error: s ÷ √n = 8 ÷ √25 = 1.6
- Margin of error: 2.0639 × 1.6 = 3.302238
- Interval: 50 ± 3.3022 = 46.6978 to 53.3022
We are 95% confident that the true population mean lies between 46.6978 and 53.3022.
Calculated with CalcBright – https://calcbright.com/confidence-interval-calculator on
The same data at other confidence levels
| Confidence | Critical value | Margin of error | Interval |
|---|---|---|---|
| 80% | 1.3178 | ±2.1085 | 47.8915 to 52.1085 |
| 85% | 1.4871 | ±2.3794 | 47.6206 to 52.3794 |
| 90% | 1.7109 | ±2.7374 | 47.2626 to 52.7374 |
| 95% | 2.0639 | ±3.3022 | 46.6978 to 53.3022 |
| 98% | 2.4922 | ±3.9875 | 46.0125 to 53.9875 |
| 99% | 2.7969 | ±4.4751 | 45.5249 to 54.4751 |
| 99.9% | 3.7454 | ±5.9926 | 44.0074 to 55.9926 |
Confidence interval formulas
Mean: x̄ ± t* × s ÷ √n · x̄ ± z* × σ ÷ √n · Proportion: p̂ ± z* × √(p̂(1 − p̂) ÷ n)
The part after ± is the margin of error: the critical value times the standard error.
Worked example
A sample of 25 has a mean of 50 and a standard deviation of 8. Find the 95% interval for the population mean.
- σ is unknown, so use t with 25 − 1 = 24 degrees of freedom: t* = 2.0639.
- Standard error = 8 ÷ √25 = 1.6.
- Margin of error = 2.0639 × 1.6 = 3.3022.
- Interval = 50 ± 3.3022 = 46.6978 to 53.3022.
With z instead of t (1.96 × 1.6 = 3.136) the interval would be slightly narrower – which is why using z with a small sample overstates your precision.
Critical values
| Confidence | z* | t* (df = 10) | t* (df = 30) |
|---|---|---|---|
| 80% | 1.2816 | 1.3722 | 1.3104 |
| 90% | 1.6449 | 1.8125 | 1.6973 |
| 95% | 1.9600 | 2.2281 | 2.0423 |
| 98% | 2.3263 | 2.7638 | 2.4573 |
| 99% | 2.5758 | 3.1693 | 2.7500 |
How to use the calculator
Choose whether you are estimating a mean or a proportion. For a mean, enter the sample mean, the standard deviation and the sample size; for a proportion, enter the number of successes and the sample size. Pick the confidence level and the interval, margin of error and working appear instantly.
Assumptions
- The sample is random and the observations are independent.
- For a mean: the data is roughly normal, or n is large enough (about 30+) for the central limit theorem.
- For a proportion: the Wald interval needs at least about 10 successes and 10 failures; otherwise rely on the Wilson interval.
Frequently asked questions
Should I use z or t?
Use t whenever you estimate the spread from the sample itself (the usual case) – it widens the interval to allow for the extra uncertainty, with n − 1 degrees of freedom. Use z only when the population standard deviation σ is genuinely known. For large samples the two are almost identical.
What does a 95% confidence interval mean?
If you repeated the sampling many times and built an interval each time, about 95% of those intervals would contain the true population value. It does not mean there is a 95% probability that this particular interval contains it.
Wald or Wilson for a proportion?
The Wald interval p̂ ± z√(p̂(1−p̂)/n) is the textbook formula but performs poorly for small samples or proportions near 0% or 100% – it can even go below 0. The Wilson score interval has much better coverage and is recommended in those cases.
How can I make the interval narrower?
Increase the sample size (the margin shrinks with √n, so quadrupling n halves it), accept a lower confidence level, or reduce variability in the measurements.
Rate the Confidence Interval Calculator
Only the average star rating is shown. Error reports go straight to our inbox so we can check and fix them. See our Methodology and privacy policy.