Confidence Interval Calculator

Build a confidence interval for a mean (z or t) or a proportion from your sample results.

Estimate

Must be greater than 0.

Number entry: use a point for decimals (1.5). Commas grouped in threes are thousands separators (1,250), and a single comma such as 1,5 is read as a decimal comma. Nothing you enter leaves your device.

Showing the example values. Change the inputs and press Calculate for your own result.

95% confidence interval for the mean

49.44147588 to 54.55852412

52 ± 2.5585241

t critical value (df = 39)
2.02269
Standard error
1.2649111

σ ÷ √n

Margin of error
2.5585241

Working

  1. Standard error = 8 ÷ √40 = 1.2649111.
  2. Margin of error = t × standard error = 2.02269 × 1.2649111 = 2.5585241.
  3. Interval = mean ± margin of error.

Assumes a random sample and roughly normal data (or a large sample).

About the confidence interval calculator

A confidence interval gives a range of plausible values for a population mean or proportion based on your sample. This calculator builds the interval for a mean using either the z or Student's t distribution, and for a proportion using the normal approximation, and shows the critical value, standard error and margin of error.

Choose a confidence level from 80% to 99.9%.

Who should use the confidence interval calculator

  • Students and researchers reporting results.
  • Analysts summarising survey or experiment results.
  • Anyone wanting to express uncertainty about an estimate.

How to use the confidence interval calculator: what each input means

Estimate
A mean or a proportion.
Confidence level
80%, 85%, 90%, 95%, 98%, 99% or 99.9%.
Sample size (n) and mean or successes
From your sample.
Standard deviation
For a mean. Choose whether it comes from the sample (t) or is known for the population (z).

How the confidence interval calculator works: method and formula

The interval is estimate ± margin of error. For a mean, the margin is the critical value times the standard error s ÷ √n, using t with n − 1 degrees of freedom when the standard deviation comes from the sample. For a proportion it is z × √(p̂(1 − p̂) ÷ n).

Mean
x̄ ± t* × s ÷ √n
Proportion
p̂ ± z* × √(p̂(1 − p̂) ÷ n)

How to read your confidence interval calculator result

A 95% interval means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true value. It does not mean there is a 95% chance the true value is in this one interval. Larger samples and lower confidence levels give narrower intervals.

Confidence Interval Calculator worked example

A sample of 40 with mean 52 and standard deviation 8, at 95% confidence (sample standard deviation).

  1. Standard error = 8 ÷ √40 = 1.2649.
  2. t critical value for 39 degrees of freedom = 2.0227 (z would be 1.9600).
  3. Margin of error = 2.0227 × 1.2649 = 2.5585.
  4. Interval = 52 ± 2.5585, from 49.441 to 54.559.
  5. For a proportion of 56 successes in 100, p̂ = 0.56 and the margin is 9.73 points.

95% confidence interval for the mean: 49.44 to 54.56.

Practical uses of the confidence interval calculator

  • Reporting the precision of an average.
  • Summarising poll results.
  • Comparing the uncertainty of two estimates.

Assumptions and limitations of this calculator

  • Assumes a random sample and roughly normal data (or a large sample) for means.
  • The proportion interval uses the normal approximation, which is unreliable with fewer than about 10 successes or failures.
  • Does not compute intervals for differences between groups or for small non-normal samples.
FAQs

Confidence Interval Calculator FAQs

Use t when the standard deviation is estimated from your sample, which is the usual case. Use z when the population standard deviation is known.

Need Something Built Around Your Numbers?

Code & Motions designs and builds custom calculators, dashboards and web tools for businesses. Tell us what you have in mind.