Everyday tool

Confidence Interval Calculator for a Mean

Enter the sample mean, known population standard deviation, sample size and confidence level.

Runs in your browser. No upload.

Values are processed locally in this browser.

Result

—

About this tool

Confidence Interval Calculator for a Mean made simple.

This page intentionally uses a z interval with a known population standard deviation. It is not a t interval and should not be used when its assumptions are unsuitable.

Guide

Using Confidence Interval Calculator for a Mean

The Confidence Interval Calculator gives a z interval for a mean. You enter the sample mean, a population standard deviation that you already know, the sample size and a confidence level of 90, 95 or 99 percent. It returns the lower and upper limits and the margin of error. It is not a t interval, so it is not for cases where you only have the sample's own standard deviation.

How to use it

  1. Type the sample mean, which is the average of your sample.
  2. Type the known population standard deviation. It must be above zero. If you only have the standard deviation of your sample, this tool is the wrong one.
  3. Type the sample size as a whole number from 2 to 1,000,000, and choose 90%, 95% or 99% confidence.
  4. Press Calculate and read the interval and the margin of error. Use Copy result to take the text, or Clear to start over.

Worked examples

A 95 percent interval for a mean of 50

You enter
Mean
50
Known sd
10
N
25
Confidence
95%
You get
Interval
46.080072 to 53.919928
Margin of error
3.919928

The margin is 1.959964 times 10 divided by the square root of 25, which is 5. That is 3.919928, and it is added to and taken from 50.

Run through the tool’s own code.

A 99 percent interval with a larger sample

You enter
Mean
172.4
Known sd
6.5
N
100
Confidence
99%
You get
Interval
170.725711 to 174.074289
Margin of error
1.674289

The critical value for 99 percent is 2.575829. The margin is 2.575829 times 6.5 divided by 10, which is 1.674289.

Run through the tool’s own code.

The same data at 90 percent

You enter
Mean
50
Known sd
10
N
25
Confidence
90%
You get
Interval
46.710293 to 53.289707
Margin of error
3.289707

The critical value for 90 percent is 1.644854, so the interval is narrower than the 95 percent one for the same data. A lower confidence level gives a tighter range.

Run through the tool’s own code.

A sample of one

You enter
Mean
50
Known sd
10
N
1
Confidence
95%
You get
Message
Sample size must be a whole number from 2 to 1,000,000.

The tool needs at least two observations and rejects a sample size of 1. A standard deviation of zero is also refused with its own message.

Run through the tool’s own code.

When it helps

  • Check a statistics homework answer where the population standard deviation is given in the problem.
  • See how the width of an interval changes when you change the sample size or the confidence level.
  • Work out a range for a process mean when the spread of the process is known from long records.
  • Teach the link between the margin of error, the standard deviation and the square root of the sample size.

Limits to keep in mind

  • Only the z method is offered, and only for a known population standard deviation. It does not switch to a t interval, and it does not handle proportions or two samples.
  • Only 90, 95 and 99 percent confidence are available. The standard deviation must be above zero, and the sample size must be a whole number from 2 to 1,000,000.
  • The method assumes a random sample and a roughly normal sampling distribution of the mean. The tool cannot check those assumptions for you.
  • The result is an estimate for a mean and not advice about a decision. A confidence level describes the method over many samples, not the odds for your one sample.

Tips

  • Use the same unit for the mean and the standard deviation, so the limits come out in that unit.
  • To halve the margin of error, you need about four times as many observations.
  • Round the limits to the same number of decimals as your data when you report them.

Sources

Common questions

About Confidence Interval Calculator for a Mean.

What formula does this use?

The interval is the sample mean plus and minus the critical value z times the known standard deviation divided by the square root of n. The NIST handbook, listed below, gives this form. The tool uses 1.644854, 1.959964 and 2.575829 for 90, 95 and 99 percent.

When should I use a t interval instead?

Use a t interval when the population standard deviation is unknown and you estimate it from your sample, which is the usual case. The NIST handbook notes that the interval is then wider because of the extra uncertainty. This tool does not offer that option.

What does a 95 percent confidence level mean?

It describes the method: if you took many samples and built an interval each time, about 95 percent of those intervals would contain the true mean. It does not mean there is a 95 percent chance that this one interval holds it, as the NIST handbook explains.

Why is the interval wider at 99 percent?

A higher confidence level needs a larger critical value, which makes the margin of error bigger. For the same data, 90 percent gives the narrowest interval and 99 percent the widest. You trade a tighter range for less confidence in the method.

Why does it reject a standard deviation of zero?

A standard deviation of zero means there is no spread at all, and the tool needs a value above zero to build an interval. If your data really has no spread, the idea of a margin of error does not apply.

How large must the sample be?

The tool accepts any whole number from 2 to 1,000,000. Whether a small sample is good enough depends on how the data is spread, which the tool cannot judge. With a small sample from non-normal data the z interval may be unreliable.

Is my data uploaded?

No. The values are handled in your browser and the page says they are not uploaded. Use the copy button if you need the result later, because it disappears when you leave the page.

How do I use Confidence interval calculator?

Enter the sample mean, known population standard deviation, sample size and confidence level.

Is my data uploaded to a server?

No. This tool runs locally in your browser. Your input is not uploaded.