Confidence Interval Calculator

Build a confidence interval for a population mean from your sample mean, standard deviation and size, at the confidence level you choose.

Confidence interval
Margin of error
Standard error
z critical value

How to Calculate a Confidence Interval

Enter your sample statistics and pick a confidence level.

1

Enter the sample statistics

Type the sample mean, the standard deviation and the sample size n.

2

Choose a confidence level

Pick 90%, 95%, 99% or another level. A higher level gives a wider interval.

3

Read the interval

The interval is the mean plus and minus the margin of error, which is the z critical value times the standard error.

Frequently Asked Questions

What is a confidence interval?
A confidence interval is a range around a sample estimate that is likely to contain the true population value. A 95% interval means that, over many repeated samples, about 95% of the intervals built this way would capture the true mean. Its width is the estimate plus or minus the margin of error, so a sample mean of 100 with a margin of error of 4 gives the interval 96 to 104. Wider intervals come from smaller samples, larger spread, or a higher confidence level.
How is the margin of error calculated?
The margin of error is the critical value times the standard error, where the standard error is the standard deviation divided by the square root of the sample size. For a 95% interval the z critical value is 1.96, so with s = 10 and n = 100 the standard error is 10 ⁄ 10 = 1 and the margin of error is 1.96. Because n sits under a square root, quartering the margin of error takes sixteen times as many observations. The interval is then the sample mean plus or minus 1.96.
Does this use z or t?
This calculator uses the normal (z) critical value: 1.645 for 90%, 1.96 for 95% and 2.576 for 99%. That is appropriate when the population standard deviation is known, or when the sample is reasonably large, usually taken as n of 30 or more. For a small sample with an estimated standard deviation the t distribution gives a slightly wider interval, so at n = 10 the 95% t value is 2.262 rather than 1.96. The two converge as the sample grows.
Is my data sent anywhere?
Your figures stay on your device when you use the confidence interval calculator. The confidence interval calculator works in the browser using JavaScript, with no server round-trip at any point, so your mean, standard deviation and sample size are never transmitted. Nothing is logged, stored or shared with a third party. That also means the tool keeps working offline.