Confidence Interval Calculator
Compute confidence intervals for mean or proportion with AI-powered step-by-step solutions
Drag & drop or click to add images or PDF
What is a Confidence Interval?
A confidence interval (CI) is a range of plausible values for an unknown population parameter, constructed from sample data. A 95% confidence interval means: if you repeated the sampling procedure many times, about 95% of the constructed intervals would contain the true parameter.
Important: the 95% refers to the procedure, not to any single computed interval. Once an interval is constructed from data, it either does or doesn't contain the true parameter — but we don't know which.
Core structure: every confidence interval has the form
The estimate is the sample statistic ( or ). The margin of error is a critical value times the standard error of the estimate.
Confidence intervals appear in:
- Election polling ('52% support, margin of error')
- Medical studies (effect size CIs)
- Quality control (mean defect rates)
- Any time you want to quantify uncertainty in an estimate, not just report a point value.
How to Compute Confidence Intervals
CI for a Population Mean (Z-Interval)
When the population standard deviation is known and the sampling distribution is approximately normal (large or normal population):
where is the critical value for the chosen confidence level.
CI for a Population Mean (T-Interval)
When is unknown (you only have , the sample standard deviation) — much more common in practice:
The critical value comes from the t-distribution with degrees of freedom. For large (), and the two intervals are very similar.
CI for a Population Proportion
For a sample proportion (where is the number of successes):
Valid when and (success-failure condition).
Critical Values
| Confidence level | (df = 29) | |
|---|---|---|
| 90% | 1.645 | 1.699 |
| 95% | 1.96 | 2.045 |
| 99% | 2.576 | 2.756 |
Margin of Error
Increasing the sample size decreases the standard error (and therefore the margin of error) by a factor of . Quadrupling halves the margin of error.
Choosing Confidence Level
- Higher confidence = wider interval. A 99% CI is wider than a 95% CI, which is wider than a 90% CI.
- 95% is the default in most academic and professional contexts.
- 99% when stakes are higher (medical, safety); 90% when a tighter point estimate matters more than coverage.
Common Mistakes to Avoid
- Misinterpreting the 95%: 'There is a 95% probability the true mean is in this interval' is wrong (frequentist). The correct statement is about the procedure: 95% of similarly constructed intervals contain the true parameter.
- Using z when t is appropriate: with unknown , use . Using understates uncertainty, especially for small .
- Forgetting in the standard error: , not .
- Wrong critical value direction: for 95% (two-tailed), not 95th-percentile . The two-tailed critical value cuts off in each tail.
- Skipping the success-failure condition for proportions: if or , the normal approximation breaks down — use an exact (Clopper-Pearson) or score-based interval.
- Conflating CI with prediction interval: a 95% CI estimates the mean with 95% coverage. A prediction interval estimates a single future observation — much wider.
Examples
Frequently Asked Questions
It means that if you repeated the entire sampling and interval-construction procedure many times, about 95% of the resulting intervals would contain the true population parameter. It is a statement about the procedure, not a probability statement about any single interval.
Use t whenever the population standard deviation σ is unknown and you're estimating with the sample standard deviation s — which is almost always in practice. Use z only when σ is genuinely known (rare outside textbook problems).
The margin of error shrinks proportionally to 1/√n. To halve the margin of error, you need to quadruple the sample size — diminishing returns set in fast.
A confidence interval estimates a population parameter (like the mean) with a given coverage rate. A prediction interval estimates a single future observation and is much wider, because it must account for both the uncertainty in the mean *and* the spread of individual values around it.
Related Solvers
Related Guides
Try AI-Math for Free
Get step-by-step solutions to any math problem. Upload a photo or type your question.
Start Solving