Confidence Interval Calculator
Confidence interval = x̄ ± (critical value × SE), where SE = s/√n. For 95% CI, use z* = 1.960 (n ≥ 30) or t*(df=n−1) for small samples. Example: n=25, x̄=75, s=10 → SE=2.0 → 95% CI = [71.08, 78.92]. A 95% CI means the procedure, applied to 100 samples, would capture the true mean ~95 times. Wider CI = less precision; narrow by increasing n.
Calculate confidence intervals for population means. Enter sample mean, standard deviation, and sample size — or paste raw data — for Z-intervals (n ≥ 30) and T-intervals (n < 30). Shows margin of error, standard error, critical value, and side-by-side comparison of 90%, 95%, and 99% intervals.
Sample Statistics
Results
All Confidence Levels
| Confidence | z* | Margin of Error | Interval |
|---|---|---|---|
| 90% | 1.645 | ±3.003 | [72.00, 78.00] |
| 95% | 1.960 | ±3.578 | [71.42, 78.58] |
| 99% | 2.576 | ±4.703 | [70.30, 79.70] |
How to Use
- 1
Choose input method
Select "Summary stats" to enter mean, SD, and n directly, or "Raw data" to paste a list of values and let the calculator compute the statistics for you.
- 2
Choose Z-interval or T-interval
Use Z-interval when n ≥ 30 or population SD is known. Use T-interval for small samples (n < 30) — the calculator automatically uses the correct t critical value for your degrees of freedom.
- 3
Select confidence level
Click 90%, 95%, or 99%. The table at the bottom shows all three simultaneously for comparison. Standard practice in most fields is 95%.
- 4
Read the interval
The result shows the CI bounds, margin of error, standard error, and critical value. Copy the full summary for reports or homework.
Frequently Asked Questions
- What is a confidence interval?
- A confidence interval (CI) is a range of values that likely contains the true population parameter. A 95% CI means: if you repeated the study 100 times with different random samples, approximately 95 of the resulting intervals would contain the true population mean. Example: a sample mean of 75 with a 95% CI of [70.4, 79.6] means you are 95% confident the population mean falls between 70.4 and 79.6. A wider interval reflects greater uncertainty (smaller n or larger SD); a narrower interval reflects more precision.
- What is the difference between a Z-interval and a T-interval?
- Use a Z-interval when sample size n ≥ 30 or when the population standard deviation (σ) is known. Use a T-interval when n < 30 and σ is unknown. The T-distribution has heavier tails than the normal (Z) distribution, producing a wider CI to account for additional uncertainty in small samples. As n increases, the T-distribution approaches the Z-distribution. At n = 120, t* ≈ z* for practical purposes. For n < 30, using a Z-interval underestimates uncertainty and produces CIs that are too narrow.
- How is the margin of error calculated?
- Margin of error (ME) = critical value × standard error. Standard error (SE) = s / √n, where s is the sample standard deviation and n is the sample size. For a 95% Z-interval: ME = 1.960 × (s / √n). Example: s = 10, n = 25 → SE = 10/5 = 2.0 → ME = 1.960 × 2.0 = 3.92. The CI is then x̄ ± 3.92. To cut the margin of error in half, you need to quadruple the sample size (since SE scales with 1/√n).
- How do I increase precision (narrow a confidence interval)?
- Three ways to narrow a CI: (1) Increase sample size n — SE = s/√n, so quadrupling n halves the SE and ME. (2) Reduce variability — collecting data more carefully or restricting to a more homogeneous population lowers the standard deviation. (3) Reduce confidence level — a 90% CI is narrower than a 95% CI because the critical value drops from 1.960 to 1.645. However, reducing confidence increases the risk of missing the true parameter. In practice, increase n first; accept a 90% CI only if the sample cost is too high.
- What does it mean to be "95% confident" in statistics?
- Being 95% confident does NOT mean there is a 95% chance the true mean falls in this specific interval. The true mean is fixed — it either is or is not in the interval. What 95% CI means: the procedure used to construct the interval, if applied to 100 random samples from the population, would produce intervals containing the true mean approximately 95 times. The 5% miss rate is the acceptable Type I error rate (α = 0.05). For higher-stakes decisions, use 99% CI (α = 0.01). The interval itself is either right or wrong — the confidence is in the method, not the result.
- What sample size do I need for a given margin of error?
- To achieve a desired margin of error (E) at a given confidence level: n = (z* × s / E)². For a 95% CI with z* = 1.960, s = 10, target E = 2: n = (1.960 × 10 / 2)² = (9.8)² = 96.04 → round up to 97. For E = 1 (half the margin): n = (19.6)² = 384.16 → 385. Halving the margin of error requires 4× the sample size. If standard deviation is unknown before data collection, use a pilot study or literature estimate for s.