Confidence Interval Calculator
Get a confidence interval for a mean from its sample mean, standard deviation and size, or for a proportion from successes and sample size. The calculator picks z or t for you and shows the work.
Last updated November 4, 2026
Sample standard deviation, 0 or more.
Whole number, 1 or more.
Result
95% CI: 42.8464 to 57.1536
| Measure | Value |
|---|---|
| Lower bound | 42.8464 |
| Upper bound | 57.1536 |
| Margin of error | ±7.1536 |
| Standard error | 3.162278 |
| Critical value | t = 2.2622 (df = 9) |
Assumes a random sample from a roughly normal population, or a large sample. A t interval is wider than a z interval for the same data.
Show the work
Formula: CI = mean ± critical value × s ÷ √n
- Standard error = 10 ÷ √10 = 3.162278.
- Critical value at 95% confidence: t = 2.2622 (df = 9).
- Margin = 2.2622 × 3.162278 = 7.1536.
- Interval = 50 ± 7.1536 = 42.8464 to 57.1536.
Result: 95% CI: 42.8464 to 57.1536
Confidence interval formulas
mean: x̄ ± crit × s ÷ √n
proportion: p̂ ± z × √(p̂(1 − p̂) ÷ n)
For a mean, the critical value is z when the sample has at least 30 values or the population standard deviation is known. Otherwise it is the Student t value with n − 1 degrees of freedom, which is larger and gives a wider interval. For example, t at 95% is 2.2622 with 9 degrees of freedom, 2.0452 with 29, and 12.706 with 1.
For a proportion, the Wald interval adds and subtracts z times the standard error from the sample proportion. It is less reliable with small samples or results near 0% or 100%, and the bounds are held within 0% to 100%.
Assumptions: a random sample, and for a small sample a roughly normal population.
See how we calculate for the formulas, sources and review schedule behind every calculator.
How to use the Confidence Interval Calculator
- Choose an interval for a mean or for a proportion.
- Enter the mean and standard deviation, or the number of successes, plus the sample size.
- Pick the confidence level and, for a mean, the distribution (automatic by default).
- Read the interval and critical value, then open Show the work.
Worked example
A sample of 10 with mean 50 and standard deviation 10 uses t with 9 degrees of freedom, giving a 95% interval of 42.85 to 57.15.
| Inputs | Critical value | Interval |
|---|---|---|
| Mean 50, s 10, n 10 | t = 2.2622 (df 9) | 42.8464 to 57.1536 |
| Mean 100, s 15, n 36 | z = 1.96 | 95.1001 to 104.8999 |
| 520 of 1,000 | z = 1.96 | 48.9% to 55.1% |
Frequently asked questions
When should I use t instead of z?
Use t when the standard deviation comes from a small sample, usually under 30 values. With a known population standard deviation, or a large sample, z is standard.
What does a 95% confidence interval mean?
The method captures the true value in about 95% of repeated samples. It is not a 95% probability that this one interval contains it.
How do I get a narrower interval?
Increase the sample size or lower the confidence level. A bigger sample reduces the standard error, while 90% is narrower than 99%.
Why does the proportion interval warn about small samples?
The Wald method assumes a roughly normal estimate, which fails with few observations or extreme proportions, so treat those intervals as rough.