Confidence Interval Calculator
Compute the confidence interval or margin of error for your sample
Use this calculator to compute the confidence interval or margin of error, assuming the sample mean most likely follows a normal distribution.
A confidence interval is a range of values that likely contains the true population parameter. A 95% confidence interval means that if you repeated the study many times, 95% of the resulting intervals would contain the true value. This calculator computes confidence intervals for means, proportions, and differences.
Confidence Interval Formula
The confidence interval is the sample estimate plus or minus a margin of error. The margin of error depends on the confidence level (z-score or t-score), standard deviation, and sample size.
CI for mean: x̄ ± z × (σ / √n) CI for proportion: p̂ ± z × √(p̂(1-p̂)/n) Common z-values: 90% CI: z = 1.645 95% CI: z = 1.960 99% CI: z = 2.576
Use t-scores when σ is unknown and sample size is small (< 30).
Interpreting Confidence Intervals
A wider interval means less precision (large standard deviation or small sample). A narrower interval means more precision. Increasing the confidence level widens the interval. Increasing sample size narrows the interval.
| Change | Effect on Interval Width |
|---|---|
| Larger sample size | Narrower (more precise) |
| Higher confidence level | Wider |
| Larger population variance | Wider |
| Smaller significance (α) | Wider |
Frequently Asked Questions
What does "95% confidence" actually mean?⌄
It does NOT mean there is a 95% probability that the true parameter is in this specific interval. The true parameter is fixed; it either is or is not in the interval. 95% confidence means that the procedure used to construct the interval would produce intervals containing the true parameter 95% of the time across many repetitions of the study.
What is the difference between confidence interval and prediction interval?⌄
A confidence interval estimates where the population mean is. A prediction interval estimates where a single new observation will fall. Prediction intervals are always wider because they must account for both uncertainty in the mean and natural variability of individual observations.
How does sample size affect the confidence interval?⌄
The margin of error is proportional to 1/√n. To halve the margin of error, you need to quadruple the sample size. This is why large surveys produce much tighter estimates than small ones: a sample of 1,600 has half the margin of error of a sample of 400.
When should I use a t-interval vs z-interval?⌄
Use z-intervals when: the population standard deviation is known, or the sample is large (n ≥ 30). Use t-intervals when: the population standard deviation is unknown AND the sample is small (n < 30). In practice, since population standard deviation is rarely known, t-intervals are used for small samples and z-intervals for large ones (where t approaches z anyway).