Confidence interval calculator

Confidence interval for a mean.

Distribution

95% confidence interval

45.87220288 to 54.12779712

50 ± 4.127797123

Margin of error
4.127797123
Standard error
10 ÷ √25 = 2
t critical value (df = 24)
2.063899

Uses Student’s t distribution, the usual choice when the standard deviation comes from the sample.

Runs in your browser. Nothing uploaded.

How to calculate a confidence interval

  1. Enter the sample mean, the sample standard deviation and the sample size.
  2. Choose the confidence level, usually 95%, and whether to use t (usual) or z.
  3. Read the interval, the margin of error and the critical value used.

Critical values

Confidence z t (n = 10) t (n = 30)
90% 1.645 1.833 1.699
95% 1.960 2.262 2.045
99% 2.576 3.250 2.756

The t values use n − 1 degrees of freedom and approach the z values as the sample grows.

Worked example

A sample of 25 parts has a mean length of 50 mm and a standard deviation of 10 mm. The standard error is 10 ÷ √25 = 2. With 24 degrees of freedom the 95% t value is 2.064, so the margin of error is about 4.13 and the interval runs from about 45.87 to 54.13 mm.

Assumptions

The interval assumes a random sample and a roughly normal population, or a sample large enough (often taken as 30 or more) for the mean to be close to normal anyway. Heavily skewed data with a small sample can make the interval misleading.