Confidence Interval Calculator
A confidence interval (CI) is an interval estimate built around a point estimate computed from a sample (a mean or a proportion) that shows the plausible range for the true value in the population. A point estimate is a single number and hides the uncertainty that comes from sampling variation; a confidence interval reports that uncertainty openly. Saying "the mean is 24.5, 95% CI [23.18, 25.82]" instead of "the mean is 24.5" also tells the reader how precise the estimate is.
This calculator covers the two common scenarios. In mean mode, the population mean of a numeric variable is estimated from the sample mean using the t distribution; in proportion mode, the population percentage of a binary (yes/no) characteristic is computed with the normal approximation (the Wald method). You do not need raw data; the summary statistics from SPSS, Excel, or a published article (n, mean, standard deviation, or n and the number of events) are enough. APA 7 and most academic journals explicitly recommend reporting a 95% confidence interval alongside effect estimates.
Confidence Levels and Critical Values
Two things set the width of a confidence interval: the critical value of the chosen confidence level and the sample size. The z values below come from the standard normal distribution and are what the calculator uses in proportion mode.
- 90% confidence level
- z = 1.645
- α = 0.10; produces the narrowest interval and is preferred for rough, exploratory analysis
- 95% confidence level
- z = 1.960
- α = 0.05; the academic standard. APA 7 recommends reporting a 95% confidence interval alongside effect estimates.
- 99% confidence level
- z = 2.576
- α = 0.01; used in medicine and in high-stakes decisions. On the same data it produces an interval about 31% wider than the 95% interval.
- Critical value in mean mode
- t (df = n − 1)
- Because the population standard deviation is unknown, t is used instead of z; for 95%, t = 2.064 at n = 25 and 1.984 at n = 100. As the sample grows, the t values approach z.
- Margin of error vs. sample size
- proportional to 1 / √n
- As the sample grows the interval narrows, but the returns diminish: halving the interval requires roughly four times the sample.
Formula
Mean: CI = x̄ ± t(α/2; n−1) · s / √n Proportion (Wald): CI = p̂ ± z(α/2) · √( p̂ (1 − p̂) / n ) Margin of error = critical value × standard error Critical values (95%): t → depends on df (2.064 for n = 25); z → 1.960
The reading "the population value lies in this interval with 95% probability" is technically wrong: what is random is not the population value but the interval itself, which changes from sample to sample. The 95% is the long-run coverage rate of the method that produces the intervals.
How to Calculate
- Choose the calculation mode: the mean of a numeric variable, or a yes/no proportion?
- Set the confidence level — 95% is the standard choice in academic work.
- Enter the summary statistics: n, x̄, and s in mean mode; n and the number of events in proportion mode.
- Read the lower and upper bounds, the margin of error, and the critical value in the results section.
- Copy the statistically correct sentence from the interpretation line into your report.
Worked Examples
95% CI for a scale score mean
For a sample of 25 people with a mean of 24.5 and a standard deviation of 3.2, the standard error is 0.64, the t critical value is 2.064, and the margin of error is ±1.32; the 95% confidence interval is [23.18, 25.82].
Sample mean (x̄): 24.50 · 95% confidence interval: [23.18; 25.82] · Lower bound: 23.18
95% CI for a survey proportion
If 220 of 400 participants said "yes", the sample proportion is 55%; at the 95% confidence level the margin of error is ±4.88 points and the confidence interval runs from 50.12% to 59.88%.
Sample proportion (p̂): 55.00% · 95% confidence interval: 50.12% – 59.88% · Lower bound: 50.12%
A wider interval at the 99% level
For a sample of 100 observations with a mean of 50 and a standard deviation of 8, the 99% confidence interval is [47.90, 52.10] (t critical 2.626, margin of error ±2.10). As the confidence level rises, the critical value grows and the interval widens.
Sample mean (x̄): 50.00 · 99% confidence interval: [47.90; 52.10] · Lower bound: 47.90