Confidence Interval Calculator
Estimate a population mean or proportion from sample data. Get the confidence interval, margin of error, standard error, critical value, and a plain-language interpretation.
Choose the type of estimate you have
Use a mean interval for measurements such as height, time, or cost. Use a proportion interval for yes/no outcomes such as conversion, approval, or defect rates.
A confidence interval calculator estimates the range likely to contain a population parameter, such as a mean or proportion. It uses the sample estimate, sample size, variability, and confidence level. A 95% confidence interval is commonly used, although 90% and 99% confidence levels are also standard.
95% Confidence Interval
--
Point Estimate
--
Margin of Error
--
Standard Error
--
Critical Value
--
Method Used
--
How to Use This Calculator
- Choose the estimate: Select population mean or population proportion.
- Set the confidence level: 95% is common, while 90% is narrower and 99% is wider.
- Enter sample data: For a mean, provide x̄, s, and n. For a proportion, provide successes and n.
- Calculate: Review the interval, margin of error, standard error, and method.
- Check assumptions: Your observations should be independent and the sample should be reasonably representative.
Confidence Interval Formulas
A confidence interval is a point estimate plus or minus a margin of error. The critical value controls how much probability is placed in the center of the sampling distribution.
General: estimate ± critical value × standard error
Mean: x̄ ± t* × (s / √n)
Proportion: p̂ ± z* × √[p̂(1 − p̂) / n]
The proportion calculator uses the Wilson score interval, which generally behaves better than the simple Wald formula, especially for smaller samples or proportions near 0 or 1.
Source: OpenStax — Statistical Inference and Confidence Intervals.
Common Confidence Levels
| Confidence | z* Critical Value | Typical Use |
|---|---|---|
| 90% | 1.645 | Exploratory estimates and narrower intervals |
| 95% | 1.960 | Most research and general reporting |
| 99% | 2.576 | High-confidence decisions with wider intervals |
Interesting Fact
A 95% confidence interval does not mean there is a 95% probability that the fixed population parameter lies in this one computed interval. It means that, over many repeated samples, about 95% of intervals created by the same procedure would contain the true parameter.
Source: UK Office for National Statistics — Uncertainty and How We Measure It.
Choose the Right Interval
Use Mean
Your variable is numeric, such as weight, response time, blood pressure, or revenue. Enter the sample mean, sample standard deviation, and sample size.
Use Proportion
Each observation is a success/failure or yes/no result, such as converted/not converted, approved/not approved, or defective/not defective.
How to Interpret Your Result
State the parameter, population, confidence level, and interval in the same sentence. Keep the interpretation about the population value rather than individual observations.
Source: Statistics Canada — Sampling Error and Confidence Intervals.
Worked Confidence Interval Examples
Follow the inputs through the calculation, then see how the answer should be reported.
Example 1 · Population Mean
Average delivery time
A random sample of 40 deliveries has a mean of 72.4 hours and a sample standard deviation of 8.1 hours.
Inputs: x̄ = 72.4, s = 8.1, n = 40, confidence = 95%
Standard error: 8.1 ÷ √40 = 1.281
Critical value: t* = 2.023 with 39 df
Margin of error: 2.023 × 1.281 = 2.591
95% CI: (69.809, 74.991) hours
Report it: We are 95% confident that the population mean delivery time is between 69.809 and 74.991 hours.
Example 2 · Population Proportion
Customer renewal rate
In a sample of 120 eligible customers, 84 renew their subscriptions. The sample renewal rate is 84 ÷ 120 = 70%.
Inputs: x = 84, n = 120, confidence = 95%
Point estimate: p̂ = 0.700
Critical value: z* = 1.960
Method: Wilson score interval
95% CI: 61.3% to 77.5%
Report it: We are 95% confident that the population renewal proportion is between 61.3% and 77.5%.
Your result may differ slightly in the last decimal when software uses a different rounding rule or proportion-interval method.
Assumptions and Validity Checklist
The arithmetic can be correct while the conclusion is unreliable. Check these conditions before using the interval.
1. Independent observations
One response should not determine another. When sampling without replacement, a common check is that the sample is no more than 10% of the population. Repeated measures and paired data require a paired analysis.
2. Representative sampling
A narrow interval measures random sampling uncertainty, not selection bias. Convenience samples, low response rates, and poor coverage can produce precise-looking estimates that miss the target population.
3. Distribution check for a mean
For a small sample, the data should be approximately normal with no severe outliers. With larger samples, the t interval is more robust, but strong skew, heavy tails, or influential outliers still deserve investigation.
4. Binary outcome for a proportion
Each observation must have one of two outcomes and the numerator must be part of the denominator. This calculator uses Wilson intervals because they behave better than basic Wald intervals for smaller samples and rates near 0% or 100%.
When this calculator is not enough
Use specialized methods for weighted, clustered, stratified, longitudinal, or complex survey data. Their effective sample size and standard error can differ substantially from the simple-random-sample calculation shown here. Confidence intervals also quantify sampling error—not measurement error, confounding, or other systematic bias.
Method notes: NIST guidance for mean intervals and CDC guidance on reliable proportion estimates.
Plan Sample Size for a Target Margin of Error
Choose precision before collecting data so the final interval is useful for the decision you need to make.
Planning for a proportion
Use n = z*²p(1 − p) ÷ E², then round up. E is the desired margin of error as a decimal. If no prior estimate of p exists, use p = 0.50; it produces the most conservative sample size.
Planning for a mean
Use n ≈ (z*σ ÷ E)², then round up. Estimate σ from a pilot study or trustworthy prior data. Because the final analysis uses t*, recheck the target after selecting a tentative sample size.
| Target margin of error | Assumed proportion | Minimum sample size |
|---|---|---|
| ±10 percentage points | 50% | 97 |
| ±5 percentage points | 50% | 385 |
| ±3 percentage points | 50% | 1,068 |
| ±2 percentage points | 50% | 2,401 |
Precision has a quadratic cost: cutting the margin of error in half requires about four times the sample size when everything else stays constant.
Finite populations: if the planned sample is a substantial share of a known population, a finite population correction can reduce the required sample.
Learn more from Penn State's confidence interval and sample-size lesson.
Frequently Asked Questions
What is a confidence interval, and what does it estimate?
A confidence interval is an interval estimate—a lower bound and upper bound around a point estimate. The point estimate is a sample statistic, while the range describes plausible values for the corresponding population parameter. It expresses uncertainty from sampling rather than the probability that this one fixed interval contains the parameter.
Why does a higher confidence level make the interval wider?
A higher confidence level requires a larger critical value, which increases the margin of error. For a two-sided 95% interval, the significance level is 5%, so alpha is 0.05 and 0.025 is placed in each tail of the reference distribution. That tradeoff gives greater confidence but less precision.
Why use a t-value instead of a z-value for a population mean?
When the population standard deviation is unknown, the sample standard deviation is used to estimate it. The resulting t-score comes from a t-distribution with n − 1 degrees of freedom and accounts for the added uncertainty in the standard error. A z-score comes from the standard normal distribution and is appropriate when the population variability is known or for methods that use a normal approximation.
What makes the margin of error smaller?
A larger sample size, lower variance, or lower confidence level produces a narrower result. Increasing the sample reduces the standard error because the formula divides variability by the square root of n. Population size usually has little effect unless the observations are drawn without replacement from a relatively small, finite population.
Can the calculator analyze paired measurements?
Yes. For paired data, calculate the difference within each matched observation, such as a before-and-after measurement from the same participant. Treat the differences as one dataset, then enter their sample mean, standard deviation, and count in mean mode. This preserves the pairing used by the experiment.
What assumptions should I check before using the result?
The observations should be independent and come from a representative random sample or a well-designed experiment. For a small-sample mean interval, inspect the data for severe skew and outliers; with a sufficiently large sample, the central limit theorem makes the sampling distribution of the mean approximately normal. Survey weights, clusters, repeated measures, and other complex research methodology may require a statistician or specialized statistical software for valid inference.
How is an interval for a proportion calculated?
The sample proportion is the number of successes divided by the total number surveyed, often reported as a percentage. It is the point estimate of the population proportion. This calculator applies the Wilson methodology, which generally produces more reliable bounds than the basic normal formula when the sample is small or the estimated percentage is close to 0% or 100%.
What is the difference between standard deviation and standard error?
Standard deviation describes how individual measurements vary within a dataset. Standard error describes how much an estimate, such as the sample mean, would vary across repeated random samples. The calculator combines that error with the appropriate critical value to form the interval.
How is a confidence interval related to a hypothesis test?
For a two-sided test using the same assumptions and alpha, a null hypothesis value outside the confidence interval would be rejected at that significance level. A value inside the interval would not be rejected. The interval is often more informative because it shows the estimate, uncertainty, and range of values compatible with the sample rather than only a yes-or-no test result.
Which critical value does the calculator use?
For a mean, it uses a t-value based on the selected confidence level and degrees of freedom. For a proportion, it uses the corresponding z-value from the normal distribution. These values are inserted into the relevant statistics formula to convert the standard error into a margin of error.
Other Useful Calculators
Elimination Method Calculator
Solve two-variable linear systems with a step-by-step elimination breakdown.
Generic Rectangle Calculator
Calculate common rectangle measurements from the dimensions you know.
Polynomial Division Calculator
Divide polynomials and find the resulting quotient and remainder.
Complex Root Calculator
Calculate roots when the solution includes complex numbers.
Normal Force Calculator
Find the normal force acting on an object in a mechanics problem.
Resultant Velocity Calculator
Combine velocity components to determine the resultant motion.