Confidence Interval Calculator

Calculate mean or proportion confidence intervals with Student t, normal or Wilson methods.

Select one mean, two independent means or a proportion. Use the same measurement units for A and B. Sample SDs must be positive. No paired-sample, finite-population or clustering correction.

Try a worked example

Loads example values in place of your current inputs. Choose one, then calculate. Examples are hypothetical; your inputs stay in this browser.

  • Mean 50, sample SD 10, n = 25: 95% t interval approximately 45.8722 to 54.1278.
  • Same mean and n with known population SD 10: 95% z interval approximately 46.0801 to 53.9199.
  • 0 successes in 10 trials: 95% Wilson upper bound approximately 0.277533, not zero.
  • 1 success in 10 trials: 95% normal interval approximately -0.085939 to 0.285939; the negative lower bound is not clipped.
  • Mean A 50 versus mean B 45: the difference is 5. With SDs 10 and 8 and sizes 25 and 20, the 95% Welch interval is approximately -0.411357 to 10.411357; it includes zero.
Use sample SD for t; known population SD for z.
Independent observations or binomial trials.
Sample SD, not standard error.
Independent observations, not paired with A.
Whole number from zero to the number of trials.
Two-sided interval.

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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