Free online formula calculators

Confidence Interval Calculator

Estimate the range likely to contain the true population mean, based on a sample mean, its standard deviation and the number of observations.

Confidence Interval Calculator
%
Result
Lower limit69.1152
Upper limit75.8848
Margin of error (±)3.3848
Standard error1.64
Critical value2.0639

Link to this calculation

Formula

CI = x̄ ± t* × s ÷ √n  (σ unknown)
CI = x̄ ± z* × σ ÷ √n  (σ known)
SymbolMeaning
x̄Sample mean
s, σSample or known population standard deviation
nSample size
t*, z*Critical value for the confidence level (t uses n − 1 degrees of freedom)

How to Use This Calculator

  1. Enter the Sample mean (x̄).
  2. Enter the Standard deviation.
  3. Enter the Sample size (n).
  4. Enter the Confidence level (%).
  5. Choose the Standard deviation is (From the sample (use t distribution), Known for the population (use z)).
  6. Press Calculate. Results also update automatically as you type.

Worked Example

Using the values pre-filled in the calculator above:

Inputs
Sample mean (x̄)72.5
Standard deviation8.2
Sample size (n)25
Confidence level95 %
Standard deviation isFrom the sample (use t distribution)
Results
Lower limit69.1152
Upper limit75.8848
Margin of error (±)3.3848
Standard error1.64
Critical value2.0639

About This Calculation

A confidence interval gives a range of plausible values for an unknown population mean, rather than a single best guess. For example, if 25 bags of coffee from a production line average 72.5 g with a standard deviation of 8.2 g, a 95% interval of about 69.1 g to 75.9 g tells you where the true average fill weight most likely lies.

The width depends on three things: the variability of the data, the sample size, and the confidence level. More data narrows the interval in proportion to √n, while demanding higher confidence widens it. When the standard deviation is calculated from the sample itself, which is almost always the case, the t distribution is used; it has heavier tails than the normal curve to account for the extra uncertainty, especially with small samples. With large samples, t and z give practically the same answer.

A common misreading is that there is a 95% probability the true mean lies inside this particular interval. Strictly, the 95% describes the method: if you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean. The interval also assumes a random sample and roughly normal data or a reasonably large n; strong skew or outliers in a small sample can make it unreliable.

Frequently Asked Questions

Should I use t or z?
Use t when the standard deviation comes from your sample, which is the usual situation. Use z only when the population standard deviation is genuinely known in advance.
Why does a higher confidence level give a wider interval?
To be more certain of capturing the true mean you have to cast a wider net. A 99% interval is roughly 30% wider than a 95% interval from the same data.
How do I get a confidence interval for a proportion?
For survey percentages use the margin of error calculator and add and subtract the result from the observed proportion.

Category: Statistics & Probability. Found a problem with this calculator? Let us know.