Confidence Interval Calculator

Estimate a two-sided Student's t interval for a sample mean or a Wilson score interval for a sample proportion from summary sample data.

Proportion-interval formula
x
n
Examples

137 of 250 respondents support the proposal. Use proportion mode to estimate a plausible support range before reporting the poll.

Confidence interval
[48.6%, 60.85%]
Lower bound
48.6%
Upper bound
60.85%
Margin of error
6.12%
Standard error
3.15%
Critical value (z*)
1.96
Sample proportion
54.8%

Wilson intervals still widen when confidence rises or n falls. For the same n, proportions near 50% are less precise than proportions near 0% or 100%. Here, 95% confidence with 137 successes out of 250 gives a half-width of 6.123.

Plausible range under the chosen model, not an exact or guaranteed truth. Sample quality, independence, and the selected confidence level all affect how persuasive the interval is.

Was this useful?

Examples

How It Works

Formula

xˉ±tsn,df=n1\bar{x} \pm t^* \cdot \frac{s}{\sqrt{n}}, \qquad df = n - 1

p^=xn\hat{p} = \frac{x}{n}

CIWilson=p^+z22n±zp^(1p^)n+z24n21+z2n\mathrm{CI}_{\mathrm{Wilson}} = \frac{\hat{p} + \frac{z^{*2}}{2n} \pm z^*\sqrt{\frac{\hat{p}(1-\hat{p})}{n} + \frac{z^{*2}}{4n^2}}}{1 + \frac{z^{*2}}{n}}

SExˉ=sn,SEp^=p^(1p^)nSE_{\bar{x}} = \frac{s}{\sqrt{n}}, \qquad SE_{\hat{p}} = \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}

Variables

xˉ\bar{x}

Sample mean

ss

Sample standard deviation

nn

Sample size

dfdf

Degrees of freedom, equal to n - 1 in mean mode

tt^*

Two-sided Student's t critical value for the chosen confidence level

xx

Number of successes in proportion mode

p^\hat{p}

Sample proportion, equal to x / n

zz^*

Two-sided normal critical value used by the Wilson score interval

Choose mean interval or proportion interval, enter the sample summary you already have, and the calculator returns the interval, margin of error, standard error, and critical value.

Mean mode uses the two-sided Student's t interval xˉ±ts/n\bar{x} \pm t^* \cdot s/\sqrt{n} with df=n1df = n - 1, so smaller samples carry a wider critical value than a normal-model shortcut. Proportion mode uses the Wilson score interval on purpose instead of the naive Wald form p^±zSE\hat{p} \pm z^* \cdot SE, because Wilson behaves better when nn is modest or the sample proportion sits near 0 or 1.

Frequently Asked Questions

01How is this different from the Statistics Calculator?
The Statistics Calculator is descriptive: it summarizes the sample you already have with numbers like mean, median, and standard deviation. This calculator takes that sample summary and turns it into an interval for a population mean or population proportion.
02How is this different from Normal Distribution or Binomial Probability?
Normal Distribution answers probability questions under an assumed bell-curve model, and Binomial Probability answers event-count questions for repeated yes/no trials. This calculator uses sample evidence to estimate a plausible range for an unknown mean or proportion.
03Why use Wilson for proportions, and does 95% confidence mean 95% certainty about this exact interval?
Wilson is more stable than the naive Wald interval when the sample is not huge or the proportion is near 0 or 1. A 95% confidence level does not mean a 95% chance that this fixed interval contains the true value; it means the method is designed to capture the true value about 95% of the time across repeated samples under the model assumptions.

All calculators