How to Use the Confidence Interval Calculator: Steps and a Worked Example

By 2 min read

Calculate a confidence interval for a mean from the sample mean, standard deviation and sample size, with the margin of error. This guide shows what to enter, a worked example with real numbers, and the limits to keep in mind. The Confidence Interval Calculator tool is free, needs no account and runs in your browser.

What you need

  • Sample mean, for example 50
  • Standard deviation, for example 8
  • Sample size, for example 40
  • Confidence level: choose 95%, 90%, 99%, 80%, 98%, 99.9%
  • Use: choose t distribution (sample standard deviation), z (known population standard deviation)

Step by step

  1. Open the Confidence Interval Calculator tool.
  2. Fill in Sample mean.
  3. Fill in Standard deviation.
  4. Fill in Sample size.
  5. Choose Confidence level.
  6. Choose Use.
  7. Read the result, which updates as soon as the inputs change.

Worked example

With these inputs:

  • Sample mean: 50
  • Standard deviation: 8
  • Sample size: 40
  • Confidence level: 95%
  • Use: t distribution (sample standard deviation)

the tool returns:

Interval: 47.4415 to 52.5585
Margin of error: ± 2.5585
Critical value (t, 39 df): 2.0227
Standard error: 1.2649

A second example

Changing Sample mean 50 to 100 gives:

Interval: 97.4415 to 102.5585
Margin of error: ± 2.5585
Critical value (t, 39 df): 2.0227
Standard error: 1.2649

Comparing two runs like this is a quick way to see how much each input moves the result.

How it works

The calculation is: Interval = mean ± critical value × SD ÷ √n. The t critical value uses n − 1 degrees of freedom. Enter the mean, standard deviation and sample size, choose the confidence level and t or z, then press Calculate.

Things to keep in mind

Assumes a random sample and a roughly normal sampling distribution (fine for n of about 30 or more).

If this is not quite what you need, try Z-Score Estimator, Sample Standard Deviation Calculator or Mean Calculator.

Related guides

More from the blog