The confidence interval calculator computes confidence intervals for means (using z or t distribution) and proportions. Enter sample statistics to get the margin of error and interval bounds at 90%, 95%, or 99% confidence.
Confidence Interval Calculator
How to Use the Confidence Interval Calculator
A confidence interval gives a range of plausible values for a population parameter. For n ≥ 30, use the z distribution; for n < 30, this tool uses a t approximation.
CI for a Mean
If n=50, x̄=72.5, s=10.2: margin of error at 95% = 1.96 × (10.2/√50) = 1.96 × 1.442 = 2.83. CI = (72.5 − 2.83, 72.5 + 2.83) = (69.67, 75.33). We're 95% confident the true population mean is between 69.67 and 75.33.
CI for a Proportion
In a poll of n=400 voters, 60% (p̂=0.60) support a candidate. MOE at 95% = 1.96 × √(0.60×0.40/400) = 1.96 × 0.0245 = 4.8%. CI = (55.2%, 64.8%). This is the "margin of error" you see in news reports.
Frequently Asked Questions
What is a confidence interval?
A confidence interval is a range of values that likely contains the true population parameter. A 95% CI means: if we repeated the sampling 100 times, about 95 of those intervals would contain the true population mean. It does NOT mean there's a 95% chance the true value is in THIS specific interval.
When should I use z vs t distribution?
Use z when n ≥ 30 (or population SD is known). Use t when n < 30 (sample is small). The t distribution is wider for small samples, producing wider intervals. As n → ∞, t approaches z. With n = 30, the t critical value for 95% CI is 2.042 vs z = 1.96 — a small but important difference.
Is this calculator free?
Yes, completely free with no signup required. All calculations run in your browser.
Is my data private?
Yes. All calculations run locally. Nothing is transmitted.
How does margin of error relate to confidence interval?
The CI = x̄ ± E, where E = z × (σ/√n) is the margin of error. To halve the margin of error, you need to quadruple the sample size (since √n appears in the denominator). For a proportion p, E = z × √(p(1-p)/n). Survey margins of error use this formula.