Confidence Interval Calculator
Compute the margin of error and the lower and upper bounds of a confidence interval at the 90%, 95%, or 99% confidence level. Essential for interpreting survey results, scientific studies, and A/B tests.
Advertisement
Calculator
See your Confidence Interval Calculator results
Enter your email to unlock results — free forever.
No spam, ever. Unsubscribe at any time.
Advertisement
Formula
CI = x̄ ± z* × (σ / √n)
The confidence interval is built around the sample mean (x̄). Multiply the critical z-value (z*) by the standard error, which is the standard deviation (σ) divided by the square root of the sample size (n). The critical z-values are 1.645 for 90%, 1.96 for 95%, and 2.576 for 99% confidence. Adding and subtracting the margin of error from the sample mean gives the interval bounds.
How to use the Confidence Interval Calculator
- 1
Enter your sample mean
- 2
Enter your standard deviation (σ)
- 3
Enter your sample size (n)
- 4
Enter your confidence level
- 5
Read your results instantly
Results update in real time as you type.
Advertisement
What a confidence interval means
A 95% confidence interval does not mean there is a 95% probability the true population mean lies within the interval. Rather, if you repeated the same study many times, 95% of the resulting intervals would contain the true mean.
This distinction is subtle but important. Once you calculate a specific interval, either the true mean is in it or it is not — there is no probability involved. What the confidence level describes is the reliability of the procedure: a 95% CI procedure produces intervals that capture the truth 95% of the time across many uses.
How sample size affects interval width
Larger samples produce narrower confidence intervals. This is because the standard error (σ/√n) shrinks as n grows. Doubling your sample size makes the interval roughly 29% narrower (because √2 ≈ 1.41). To cut the interval in half, you need to quadruple the sample size.
This is why large-scale surveys are expensive but valuable: a poll of 400 people has a margin of error about twice as large as a poll of 1,600 people at the same confidence level.
Advertisement
Choosing the right confidence level
The 95% confidence level is the scientific convention in most fields. It corresponds to a significance threshold of 0.05 (5% chance of a false positive). For medical decisions with serious consequences, 99% is common. For quick business estimates where some uncertainty is acceptable, 90% may suffice.
Increasing confidence from 95% to 99% widens the interval — you gain certainty at the cost of precision. For the same sample, a 99% CI is always wider than a 95% CI, which is always wider than a 90% CI.
Tips & Insights
Use t-distribution for small samples
When n < 30, replace the z critical values with t critical values from the t-distribution with n−1 degrees of freedom. Z values slightly understate uncertainty for small samples.
This formula requires known σ
This calculator uses the z-based formula, which assumes you know the population standard deviation. If you only have the sample standard deviation, the t-distribution is technically more appropriate.
Margin of error is half the interval width
The full interval width is 2 × margin of error. A poll reporting ±3% has an interval 6 percentage points wide. When comparing polls, use full interval width for fair comparisons.
Worked Examples
Customer satisfaction survey
Margin of error: ±0.208. 95% CI: (6.99, 7.41). You can be 95% confident the true average satisfaction score is between 6.99 and 7.41 out of 10.
Clinical trial measurement
Margin of error: ±7.29. 99% CI: (132.71, 147.29). The true population mean falls within this range with 99% confidence.
Advertisement
Frequently Asked Questions
What is a confidence interval?
A confidence interval is a range of values that is likely to contain the true population parameter. A 95% CI means that if the same procedure were repeated many times, 95% of the resulting intervals would contain the true value.
Why do wider confidence intervals indicate less precision?
A wider interval reflects more uncertainty. This can result from a small sample size, high variability in the data, or choosing a higher confidence level (e.g., 99% instead of 95%).
What is the critical value for a 95% confidence interval?
For a 95% confidence interval using the normal distribution, the critical z-value is 1.96. This means the interval extends 1.96 standard errors above and below the sample mean.
How do I reduce my margin of error?
Increase your sample size. The margin of error shrinks with the square root of n, so to halve the margin of error you need to quadruple the sample size.
Can a confidence interval contain negative values?
Yes. If the data contains negative values or the lower bound calculation results in a negative number, the interval can extend into negative territory. This is mathematically valid.
Advertisement