Confidence interval calculator
A point estimate is one number; a confidence interval is the range your data can actually defend. This builds the right one for each kind of estimate.
A confidence interval is a range of plausible values for a population parameter, computed so that the procedure captures the true value a stated percentage of the time across repeated samples. This calculator returns an interval for a mean from raw data or summary statistics, a single proportion using the Wilson score method, and a Pearson correlation using the Fisher z transformation, at the 90%, 95%, or 99% level. Each result shows the bounds, the margin of error, and the critical value behind them.
95% confidence interval for the mean
4.86 to 5.21
From 12 values with a sample mean of 5.03.
The formulas behind each interval
A confidence interval for a mean centres on the sample mean and extends by a margin of error:
CI = M ± t₋ × (s / √n)
where t₋ is the critical value of the t distribution for the chosen confidence level and n - 1 degrees of freedom. For a proportion the calculator uses the Wilson score interval rather than the simple normal approximation, because Wilson stays inside 0 to 1 and is accurate even when the proportion is near an extreme or the sample is small. For a correlation the interval is built on the Fisher z scale, where r is transformed to z = arctanh(r), a symmetric interval is formed using the normal critical value and a standard error of 1 / √(n - 3), and the bounds are transformed back with the hyperbolic tangent.
Frequently asked questions
- How do you calculate a 95% confidence interval?
A 95% confidence interval for a mean is the sample mean plus and minus the margin of error, where the margin is the t critical value for 95% confidence and n minus 1 degrees of freedom multiplied by the standard error of the mean. The standard error is the standard deviation divided by the square root of the sample size. Enter your data or summary figures above and the interval, margin, and critical value are returned together.
- What does a 95% confidence interval actually mean?
It means that if the study were repeated many times and an interval computed each time, about 95% of those intervals would contain the true population value. It is a statement about the long-run behaviour of the procedure, not a 95% probability that this particular interval contains the parameter, which is a common misreading. The wider the interval, the less precisely the sample pins down the population value.
- Should I use a t or a z critical value for a confidence interval?
Use a t value whenever the population standard deviation is unknown and you have estimated it from the sample, which is almost always the case for a mean in a dissertation. The z value is only correct when the population standard deviation is known or the sample is very large, where t and z nearly coincide. This calculator uses the t distribution for means and the normal distribution for proportions and correlations, which is the standard convention.
- What is the difference between a confidence interval and a standard error?
The standard error measures how much a sample statistic would vary from sample to sample, while the confidence interval turns that standard error into a range of plausible values for the population parameter. The interval is built by multiplying the standard error by a critical value and adding it on either side of the estimate. A confidence interval is therefore the more directly interpretable quantity for a results section.