One Calculator Logo One Calculator
Mathematics & Statistics • Formulas shown

Confidence Interval Calculator

Quick Answer

A confidence interval for a mean is mean ± critical value × (s ÷ √n). With a mean of 52, a standard deviation of 8 and 40 observations, the 95% interval is 49.44 to 54.56, a margin of error of ±2.56 using t* = 2.0227.

Result

95% confidence interval: 49.4415 to 54.5585

Margin of error± 2.5585
Critical value t* (df = 39)2.0227
Standard error1.26491
Step-by-step calculation
  1. CI = mean ± critical value × (s ÷ √n)
  2. Standard error = 8 ÷ √40 = 1.26491
  3. Margin = 2.0227 × 1.26491 = 2.5585

Assumes a random sample from an approximately normal population (or a large sample).

About the Confidence Interval Calculator

A confidence interval gives a range of plausible values for the true population mean. A 95% level means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean.

Use the t distribution when the standard deviation comes from the sample, which is almost always the case; it has wider tails for small samples. Use z only when the population standard deviation is genuinely known. The calculator shows the critical value, the standard error and the margin of error.

How to Use the Confidence Interval Calculator

  1. Enter the sample mean, standard deviation and sample size.
  2. Choose the confidence level and whether σ is known.
  3. Read the interval and margin of error.

Formula and Method

Confidence interval

x̄ ± t* × s ÷ √n

Use z* when σ is known.

Standard error

s ÷ √n

Worked Example

40 measurements

Input: mean 52, s = 8, 95%

  • SE = 8 ÷ √40 = 1.2649
  • t* (df = 39) = 2.0227
  • Margin = 2.5585

Result: 49.44 to 54.56.

Frequently Asked Questions

What does 95% confidence mean?

It describes the method: 95% of intervals constructed this way capture the true mean. It is not a 95% probability for this one interval.

t or z?

Use t when estimating the standard deviation from the sample. For large samples they are nearly the same.

How can I narrow the interval?

Increase the sample size or accept a lower confidence level.

Does it need normal data?

Roughly normal data or a large sample.

Related Calculators

All Math & Statistics Calculators →

Sources and Further Reading

Accuracy and Scope

Results use standard IEEE-754 double-precision arithmetic and are rounded for display. For exam, engineering or research work, verify critical values with a second method. See our full disclaimer.