Confidence Interval Calculator
Calculate mean or proportion confidence intervals with Student t, normal or Wilson methods.
Your result
About this tool
Build a two-sided confidence interval for one population mean, the difference between two independent population means, or a binomial proportion. Choose the statistical method explicitly, inspect the standard error and interval construction, and export a worksheet without sending observations to a server.
Choose the method before entering the numbers
- For two independent means, choose Welch t. Enter both sample means, positive sample SDs and sample sizes of at least two. Use the same units for both groups; paired observations need a different method.
- For a mean with population spread estimated from your sample, choose Student t. Enter the sample mean, sample SD, sample size and confidence level. A normal z interval requires the population SD to be known independently.
- For a proportion, enter the number of independent trials and observed successes. Enter a count, not a percentage: 12 successes in 25 trials means 0.48. Mean and SD fields are ignored in proportion modes.
- Calculate and read the bounds alongside the method and working. The diagram marks the observed estimate with a diamond; Wilson adjusts its interval center, so the interval need not be symmetric about that estimate.
- Download CSV to retain the inputs, critical value, standard error and bounds at browser precision. Check the sampling design and interpretation cautions before using the interval.
How the calculation works
Mean interval=mean±critical×SD/√n. One-mean t uses n−1 df. Two independent means use Welch–Satterthwaite df and SE = sqrt(SD_A²/n_A + SD_B²/n_B). Wilson proportion uses its score-interval center and half-width; basic normal uses p±z√(p(1−p)/n).
Worked example
For mean 50, sample SD 10 and n = 25, standard error is 10 / √25 = 2. With 24 degrees of freedom, the 95% t critical value is approximately 2.063899. The margin is approximately 4.127797, giving bounds 45.872203 and 54.127797. If population SD 10 were known instead, the z critical value is approximately 1.959964 and the interval is narrower: 46.080072 to 53.919928.
Compare two independent means with a Welch interval
The estimated difference is mean A minus mean B. Its standard error is sqrt(SD_A²/n_A + SD_B²/n_B). Write a = SD_A²/n_A and b = SD_B²/n_B; the Welch–Satterthwaite degrees of freedom are (a + b)² / [a²/(n_A − 1) + b²/(n_B − 1)]. The interval is the estimated difference plus or minus its two-sided t critical value times that standard error. Do not round the degrees of freedom to an integer.
For means 50 and 45, sample SDs 10 and 8, and sample sizes 25 and 20, the difference is 5. Standard error is about 2.683282 and degrees of freedom about 42.998836. At 95% confidence the bounds are approximately −0.411357 and 10.411357. Swapping A and B reverses the signs and order of the bounds.
This method does not assume equal population variances, but it still requires independent samples and a suitable model for their means. It does not handle paired or clustered observations, prove equality when zero lies in the interval, or establish causality. Both entered sample SDs must be positive in this implementation.
A mean and a proportion need different inputs
A mean interval estimates a population average in the original measurement units. A proportion interval estimates the chance of a binary outcome under a binomial sampling model, on a scale from zero to one. Neither is a prediction interval for an individual observation.
Choosing z because a sample is large does not make its population standard deviation known. Student t incorporates the uncertainty of estimating spread from a sample; its degrees of freedom are n − 1. Independence and a suitable sampling model still matter.
Why zero successes does not establish a zero rate
For zero observed successes in 10 trials, the 95% Wilson interval has an upper bound of about 0.277533. The observed proportion is zero, but a range of population proportions remains compatible with the sample under this model.
The basic normal approximation instead has zero plug-in standard error at zero or all successes. At other small counts it can extend below zero or above one. This tool leaves those bounds unclipped and warns about the method; clipping would conceal the limitation rather than repair coverage. Wilson is an approximation, not the exact binomial method.
Interpret the confidence level as a method property
Under the sampling model, a 95% procedure is designed for repeated-sampling coverage. It does not assign a 95% probability to a fixed population parameter lying in the particular interval you calculated. The observed interval either includes that parameter or it does not.
These intervals do not correct selection bias, dependent or clustered observations, multiple comparisons or finite-population sampling. Summary statistics alone cannot verify these assumptions. Very large centers and tiny margins can become indistinguishable at browser precision; rescale measurements when necessary.
Assumptions and limitations
Sample size at least two. Mean-z requires truly known population SD. Basic normal proportion intervals are not clipped and can be unreliable near 0/1 or at small counts. No finite-population or clustered-sample correction.
A confidence level describes repeated-sampling coverage under the method’s assumptions; it is not a probability assigned to a fixed parameter after seeing these data.
Sources and editorial responsibility
Maintained by Renvoro Pty Ltd. Sources inform the methods and assumptions shown here; outputs have the limitations described on this page.
Common questions
Does increasing the confidence level make an interval wider?
With the same data and method, selecting greater confidence raises the critical value and generally widens the interval. It trades precision for coverage under the model.
When should I choose Mean t instead of Mean z?
Use the t method when the population standard deviation is unknown and you estimate it from the sample. The z method for a mean requires a known population standard deviation.
Why choose Wilson for a proportion near zero or one?
The basic normal interval can extend outside 0 to 1 and perform poorly with small samples or extreme proportions. The Wilson method is designed for binomial proportions and avoids that particular problem.
Guide updated 2026-10-26. Calculation method and source dates remain separate.
Method reviewed 2026-10-13. Calculation standards · Report an issue