CalcUnit Logo

How to Calculate Confidence Interval

Calculate confidence intervals for population means.

The Formula

CI = x̄ ± z*(σ/√n)

The confidence interval formula uses the mathematical relationship: CI = x̄ ± z*(σ/√n). Each variable in the formula represents a measurable quantity that affects the final result.

What Each Variable Means

Every value in the confidence interval formula, what it measures, and the value used in the worked example on this page:

VariableTypeExample value
Sample Mean (x̄)Input (you provide)50
Sample Standard Deviation (s)Input (you provide)10
Sample Size (n)Input (you provide)30
Z* for your level (1.645 = 90%, 1.96 = 95%, 2.576 = 99%) — converted to t* automaticallyInput (you provide)1.96
Margin of ErrorResult (calculated)—
Lower BoundResult (calculated)—
Upper BoundResult (calculated)—
Interval WidthResult (calculated)—

Step-by-Step Method

  1. 1Write down the values you know: Sample Mean (x̄), Sample Standard Deviation (s), Sample Size (n), Z* for your level (1.645 = 90%, 1.96 = 95%, 2.576 = 99%) — converted to t* automatically.
  2. 2Substitute your known values into the formula: CI = x̄ ± z*(σ/√n).
  3. 3Work through the arithmetic in the standard order of operations — parentheses first, then exponents, then multiplication and division, then addition and subtraction.
  4. 4Check that your result carries the correct unit and falls in a reasonable range for the problem.
  5. 5Verify your answer with the interactive Confidence Interval Calculator — it solves the same formula instantly.

Worked Example

Take a concrete case: sample mean (x̄) = 30, with the other inputs at the typical values from the variables table above. Substituting into the formula gives margin of error = 3.7341, lower bound = 26.2659, upper bound = 33.7341, interval width = 7.4683. These numbers are solved by the same engine that powers the Confidence Interval calculator, so you can reproduce them exactly by entering the same inputs there.

Sample Mean (x̄)Margin of ErrorLower BoundUpper BoundInterval Width
103.73416.265913.73417.4683
303.734126.265933.73417.4683
403.734136.265943.73417.4683
503.734146.265953.73417.4683
603.734156.265963.73417.4683
803.734176.265983.73417.4683
1003.734196.2659103.73417.4683
2003.7341196.2659203.73417.4683

How each result changes as sample mean (x̄) changes, holding the other inputs constant.

Practice Problems

1. 95% CI: mean=50, SD=10, n=30: Plug in Sample Mean (x̄) 50, Sample Standard Deviation (s) 10, Sample Size (n) 30, and 1 more more inputs. What is the answer?

Answer: With Sample Mean (x̄) 50, Sample Standard Deviation (s) 10, Sample Size (n) 30, and 1 more more inputs, the results are Margin of Error 3.7341, Lower Bound 46.2659, Upper Bound 53.7341, Interval Width 7.4683.

2. Given Sample Mean (x̄) 125, Sample Standard Deviation (s) 15, Sample Size (n) 50, and 1 more more inputs, what does it come out to?

Answer: Entering Sample Mean (x̄) 125, Sample Standard Deviation (s) 15, Sample Size (n) 50, and 1 more more inputs gives Margin of Error 5.6854, Lower Bound 119.3146, Upper Bound 130.6854, Interval Width 11.3709.

Frequently Asked Questions

What is the formula for confidence interval?

The formula is: CI = x̄ ± z*(σ/√n). Calculate confidence intervals for population means.

What values do I need to calculate confidence interval?

You need sample mean (x̄), sample standard deviation (s), sample size (n), z* for your level (1.645 = 90%, 1.96 = 95%, 2.576 = 99%) — converted to t* automatically. The calculator produces margin of error, lower bound, upper bound, interval width from those inputs.

What is the confidence interval when sample mean (x̄) is 30?

With sample mean (x̄) = 30, the result is margin of error = 3.7341, lower bound = 26.2659, upper bound = 33.7341, interval width = 7.4683. This is worked through in full in the example on this page.

Related Topics

confidence intervalstatistics

Use the Interactive Calculator

Skip the manual math — get instant results with our free Confidence Interval calculator.

Open Calculator

Related Calculators