Confidence Interval Calculator
CI for mean (z or t distribution) and proportion — with margin of error, critical value, and visual range.
Try Example
Enter as decimal: e.g., 0.42 for 42%
Try Example
Confidence Interval Results
—
Critical Values (z*) Reference
| Confidence Level | z* (Critical Value) | α (Error Rate) | Typical Use |
|---|---|---|---|
| 80% | 1.282 | 0.20 | Exploratory research, pilot studies |
| 85% | 1.440 | 0.15 | Moderate precision requirements |
| 90% | 1.645 | 0.10 | Engineering, quality control |
| 95% | 1.960 | 0.05 | Most common — science, medicine, polling |
| 99% | 2.576 | 0.01 | High-stakes decisions, clinical trials |
Formulas Used
What Is a Confidence Interval?
A confidence interval (CI) is a range of plausible values for a population parameter (such as a mean or proportion), constructed from a random sample. Instead of estimating with a single number — which is almost certainly not exactly equal to the true value — a confidence interval provides a range that captures the uncertainty inherent in sampling.
The "confidence level" (80%, 90%, 95%, 99%) describes the reliability of the construction method: if you repeated the sampling and CI construction process many times, that percentage of the resulting intervals would contain the true population value.
The Most Common Misconception About Confidence Intervals
The statement "We are 95% confident the mean is between 47.1 and 52.9" is often (incorrectly) interpreted as "There is a 95% probability the true mean is in this interval." This is wrong.
The true population mean is a fixed (though unknown) value — it doesn't have a probability distribution. The interval itself is what's random (it changes with each sample). The correct interpretation: "If we used this method on 100 different random samples, approximately 95 of the resulting intervals would contain the true mean." Your specific interval either contains it or it doesn't — you just don't know which.
When to Use z vs t Distribution
- Use z-interval when: the population standard deviation σ is known, OR when n ≥ 30 (Central Limit Theorem makes the normal approximation reliable).
- Use t-interval when: σ is unknown AND n < 30. The t-distribution has heavier tails than the normal to account for additional uncertainty from estimating σ. As n increases, t converges to z.
- CI for proportion: Always use z-interval (normal approximation), valid when np̂ ≥ 10 and n(1-p̂) ≥ 10.
How Sample Size Affects Precision
The margin of error E = z* × σ/√n. Since n is under a square root, the relationship is not linear:
- To halve the margin of error, you must quadruple the sample size.
- A sample of 400 gives half the margin of error of a sample of 100.
- This is why polls with n = 1,000 typically report ±3% margins, and n = 400 gives ±5%.
Real-World Applications of Confidence Intervals
Medical Research
Clinical trial results are always reported with confidence intervals. A drug that reduces blood pressure by "−5.2 mmHg (95% CI: −7.8 to −2.6)" conveys both the effect size and the range of plausible true effects. A CI that crosses zero would indicate the effect is not statistically distinguishable from no effect.
Political Polling
Opinion polls routinely report margins of error, e.g., "48% support (±3%, 95% CI)." This means the poll would produce this interval 95% of the time if sampling were repeated. Note that "margin of error" in polling refers to the half-width of the CI, not the full width.
Quality Control
Manufacturing processes use CIs to monitor whether product dimensions are within acceptable ranges. A sample mean that falls outside the CI suggests the process has drifted and requires adjustment.
Frequently Asked Questions
A confidence interval is a range of plausible values for a population parameter, calculated from sample data. A 95% CI means: if you repeated the sampling process 100 times and built a CI each time, approximately 95 of those intervals would contain the true parameter. It quantifies the uncertainty arising from using a sample (not the whole population).
It means the method has a 95% success rate — not that there's a 95% probability the true value is in your specific interval. The true population mean is fixed; only the interval is random. If you built 100 CIs from 100 different samples, about 95 would contain the true mean. Your specific interval either contains it or it doesn't — the 95% describes the procedure, not an individual interval.
Use z when: population σ is known, OR n ≥ 30 (CLT ensures normality). Use t when: σ is unknown AND n < 30, using the sample standard deviation s (with df = n − 1). For proportions, always use z (normal approximation), valid when np̂ ≥ 10 and n(1−p̂) ≥ 10. As n grows large, t* converges to z* — for n = 100, the difference is negligible.
Larger samples give narrower (more precise) CIs. The margin of error E = z* × σ/√n — to halve E, you must quadruple n. A sample of 400 gives half the margin of error of n = 100. This relationship (√n denominator) explains why polling organizations use large samples and why collecting twice as many data points does not double precision.
The margin of error (E) is half the width of the confidence interval: E = critical_value × SE. It is added and subtracted from the point estimate to get the CI bounds: [x̄ − E, x̄ + E]. In polling, a "±3% margin of error" means E = 0.03. A smaller margin of error requires a larger sample size, as the relationship is E ∝ 1/√n.
For mean with known σ: x̄ ± 1.960 × (σ/√n). For mean with unknown σ, n < 30: x̄ ± t* × (s/√n) where t* from t-table with df = n−1. For proportion: p̂ ± 1.960 × √(p̂(1−p̂)/n). The key z* for 95% CI is 1.960. Example: x̄=50, n=25, s=10 → E = 1.960 × (10/5) = 3.92 → CI is (46.08, 53.92) using z, slightly wider with t*.
A point estimate is a single value that estimates a population parameter. For the mean, it's x̄ (sample mean). For a proportion, it's p̂ (sample proportion). A point estimate alone gives no information about uncertainty — the CI wraps uncertainty around it. Reporting only a point estimate (e.g., "the average is 47") without a CI or margin of error is statistically incomplete.
Yes — and this is by design. A 95% CI will fail to contain the true value about 5% of the time. If you run 20 studies and build a 95% CI in each, on average one will miss the true value. This is the α (alpha) error rate. Higher confidence levels (99%) miss less often but produce wider intervals. There is always a trade-off between precision and confidence — you cannot have a very narrow CI with a very high confidence level unless you have a very large sample.