Confidence Interval Calculator
A Range, Not Just a Point
A sample mean or sample proportion is always just an estimate — a different sample would give a slightly different number. A confidence interval reports a range of plausible values for the true population parameter, along with a confidence level describing how often intervals built this way actually contain the truth. A 95% confidence interval doesn't mean there's a 95% chance the true value is inside this specific interval; it means that if you repeated the sampling process many times, about 95% of the resulting intervals would contain it.
The Formulas
CI = x̄ ± t* × (s ÷ √n)
For a Proportion (normal approximation):
CI = p̂ ± z* × √(p̂(1−p̂) ÷ n)
t* and z* are critical values pulled from the t- and standard normal distributions respectively, based on the chosen confidence level and (for the mean case) the degrees of freedom.
Worked Examples
| Scenario | Inputs | Result |
|---|---|---|
| Mean | x̄=75, s=10, n=25 | 70.87 to 79.13 |
| Proportion | 120 of 400 successes | 25.51% to 34.49% |
In the mean example, the critical value comes from the t-distribution with 24 degrees of freedom (t* = 2.064), not the normal distribution — using z* = 1.96 instead would understate the interval's width for a sample this size.
Where This Matters
- Clinical research — reporting the plausible range for a treatment effect, not just a single point estimate.
- Political polling — the "margin of error" quoted in a poll defines the confidence interval around the reported percentage.
- Manufacturing — estimating the true average dimension or defect rate of a full production run from a sample.
- A/B testing — confidence intervals around conversion rates help judge whether an observed difference is likely real or just sampling noise.
How to Use This Calculator
- Choose Confidence Interval for a Mean or for a Proportion from the dropdown.
- For a mean: enter the sample mean, sample standard deviation, and sample size.
- For a proportion: enter the number of successes and the sample size.
- Enter your desired confidence level as a percentage (95 is the most common choice).
- Select Calculate to get the interval.
Related Calculations
This calculator relies on the Standard Error Calculator's underlying logic. To determine the sample size needed to hit a target margin before you collect data, use the Sample Size Calculator.