Calculating your margin of error is straightforward once you know the Confidence Interval formula and what each input means. This guide explains the method in plain language, walks through a manual calculation, and gives worked examples you can follow — then you can do it instantly with the Confidence Interval Calculator.
What is Confidence Interval?
The Confidence Interval calculation tells you your margin of error from a few simple inputs. The figure you are solving for here is the margin of error.
The Confidence Interval formula
The core formula is:
Margin of error = Confidence level × Standard deviation ÷ √(Sample size)
Here is what each input means:
- Sample mean — a number. Example: 100.
- Standard deviation — a number. Example: 15.
- Sample size — a number. Example: 30.
- Confidence level — one of: 90% (z = 1.645), 95% (z = 1.96), 99% (z = 2.576). Example: 95% (z = 1.96).
How to calculate it step by step
- Write down the sample mean (for example, 100).
- Write down the standard deviation (for example, 15).
- Write down the sample size (for example, 30).
- Choose the confidence level (for example, 95% (z = 1.96)).
- Apply the formula above to get your margin of error.
- Double-check the result with the Confidence Interval Calculator.
Worked examples
Example 1
| Input / Output | Value |
|---|---|
| Sample mean | 100 |
| Standard deviation | 15 |
| Sample size | 30 |
| Confidence level | 95% (z = 1.96) |
| Margin of error | 5.368 |
| Lower bound | 94.632 |
| Upper bound | 105.368 |
With sample mean of 100, standard deviation of 15, sample size of 30 and confidence level of 95% (z = 1.96), the margin of error works out to 5.368.
Example 2
With sample mean of 200, standard deviation of 15, sample size of 30 and confidence level of 95% (z = 1.96), the margin of error works out to 5.368.
| Result | Value |
|---|---|
| Margin of error | 5.368 |
| Lower bound | 194.632 |
| Upper bound | 205.368 |
Example 3
With sample mean of 50, standard deviation of 15, sample size of 30 and confidence level of 95% (z = 1.96), the margin of error works out to 5.368.
| Result | Value |
|---|---|
| Margin of error | 5.368 |
| Lower bound | 44.632 |
| Upper bound | 55.368 |
Tips for an accurate result
- Keep your units consistent — mixing, say, months with years or grams with kilograms is the most common source of error.
- Round only at the very end. Rounding inputs early can shift the final answer noticeably.
- Re-run the numbers whenever an input changes, rather than estimating from an old result.
Prefer not to do the maths by hand? — the Confidence Interval Calculator does it instantly, for free, with the formula and a worked example built in.
Related calculators
Continue exploring math calculators with these tools: Margin of Error Calculator, Sample Size Calculator, Coefficient of Variation Calculator, Regular Heptagon Area Calculator, Odds to Probability Calculator.