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:
| Variable | Type | Example 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* automatically | Input (you provide) | 1.96 |
| Margin of Error | Result (calculated) | — |
| Lower Bound | Result (calculated) | — |
| Upper Bound | Result (calculated) | — |
| Interval Width | Result (calculated) | — |
Step-by-Step Method
- 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.
- 2Substitute your known values into the formula: CI = x̄ ± z*(σ/√n).
- 3Work through the arithmetic in the standard order of operations — parentheses first, then exponents, then multiplication and division, then addition and subtraction.
- 4Check that your result carries the correct unit and falls in a reasonable range for the problem.
- 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 Error | Lower Bound | Upper Bound | Interval Width |
|---|---|---|---|---|
| 10 | 3.7341 | 6.2659 | 13.7341 | 7.4683 |
| 30 | 3.7341 | 26.2659 | 33.7341 | 7.4683 |
| 40 | 3.7341 | 36.2659 | 43.7341 | 7.4683 |
| 50 | 3.7341 | 46.2659 | 53.7341 | 7.4683 |
| 60 | 3.7341 | 56.2659 | 63.7341 | 7.4683 |
| 80 | 3.7341 | 76.2659 | 83.7341 | 7.4683 |
| 100 | 3.7341 | 96.2659 | 103.7341 | 7.4683 |
| 200 | 3.7341 | 196.2659 | 203.7341 | 7.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
Use the Interactive Calculator
Skip the manual math — get instant results with our free Confidence Interval calculator.
