Confidence interval calculator

Gives the range likely to contain the true population mean, with the margin of error and the critical value used.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter sample mean (x̄), standard deviation, sample size (n), confidence level and distribution.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Interval = x̄ ± critical value × (s ÷ √n). The critical value comes from the t distribution with n - 1 degrees of freedom, or from z when the population SD is known.

Example

Inputs: Sample mean (x̄) = 50, Standard deviation = 10, Sample size (n) = 25, Confidence level = 95%, Distribution = t (SD from the sample). Result: 95% confidence interval: 45.8722 to 54.1278; Lower bound: 45.872203; Upper bound: 54.127797.

Limits and caveats

  • Assumes a random sample and roughly normal data, or a large sample (about 30 or more).
  • This is an interval for a mean; for a survey percentage use the margin of error calculator.

Questions about this tool

When do I use t and when z?

Use t when the standard deviation comes from the sample itself, which is the usual case. Use z only when the population SD is known in advance.

What does 95% confidence mean?

If you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean.

How can I make the interval narrower?

Use a larger sample or accept a lower confidence level. Quadrupling the sample size roughly halves the margin of error.