Confidence Interval Calculator
With sample mean 100, standard deviation 15, sample size 36, confidence interval comes to 4.8999 — margin of error. It is reached in 8 steps, the last of which is 1.959964 * 2.5, and each one is printed on the page with its numbers filled in. The formula is the one published by NIST/SEMATECH e-Handbook of Statistical Methods, not an approximation fitted to it.
The confidence interval around a sample mean, with the margin of error and what the interval does and does not claim.
Formula and sources checked · How we check
Sample mean 100, Standard deviation 15, Sample size 36, Confidence level 95%
4.8999
Margin of error for the example below. Editing a field recomputes the calculator below; this figure holds the answer the page was loaded with.
It is written into the HTML rather than drawn by a script, so a search engine reading this page without running JavaScript still finds an answer.
- Critical value, z
1.96- Standard error of the mean
15 / sqrt(36)2.5- Margin of error
1.959964 * 2.54.9- Lower bound
100 - 4.8999195.1- Upper bound
100 + 4.89991104.9- Width of the interval
4.89991 * 29.8- Margin as a share of the mean
4.89991 / abs(100) * 1004.9 %- Sample size to halve the margin
36 * 4144
Worked example
A mean of 100 with a standard deviation of 15 from 36 observations has a standard error of 2.5, so the 95% interval is 100 ± 4.9 — from 95.1 to 104.9. Halving that margin would take 144 observations, not 72.
How to work it out yourself
- 1.Enter the sample mean, the sample standard deviation and how many observations it came from.
- 2.Pick the confidence level. Higher confidence buys a wider interval, not a better estimate — 99% is not more accurate than 95%, it is more cautious.
- 3.Read the last line before planning more data collection: the margin falls with the square root of the sample size, so four times the data halves it.
The formula
- Critical value, z
- Standard error of the mean
15 / sqrt(36) - Margin of error
1.959964 * 2.5 - Lower bound
100 - 4.89991 - Upper bound
100 + 4.89991 - Width of the interval
4.89991 * 2 - Margin as a share of the mean
4.89991 / abs(100) * 100 - Sample size to halve the margin
36 * 4
Source: NIST/SEMATECH e-Handbook of Statistical Methods — confidence limits for the mean
Questions people actually ask
- What does a 95% confidence interval actually mean?
- That the procedure produces an interval containing the true value 95% of the time, over many repetitions. It does not mean there is a 95% probability that this particular interval contains it — the true value is fixed and this interval either does or does not. The distinction sounds pedantic and is the source of most misreadings of published results.
- Should I use z or t?
- Strictly, t whenever the population standard deviation is unknown, which is nearly always. In practice the two agree to the third decimal past about 30 observations: at n = 30 the 95% t value is 2.045 against z’s 1.960, a 4% wider interval, and by n = 100 the gap is under 1%. Below about 30 the difference is worth taking seriously and this page will understate your margin.
- How do I make the interval narrower?
- More data, less variability, or less confidence. Only the first is usually available, and it works slowly: the margin falls with the square root of n, so halving it takes four times the observations and cutting it to a tenth takes a hundred times. That square root is why large studies cost what they do.
- Is a wide interval a bad result?
- It is an honest one. A wide interval says the data does not pin the answer down, which is worth knowing and is exactly what a point estimate hides. The failure is not a wide interval, it is quoting a mean with no interval at all.
Related
- Z-Score to P-Value CalculatorExact p-value from a z-score, one-tailed or two-tailed, with the percentile the score sits at.
- Percentage Change CalculatorPercentage increase or decrease between two values, with the absolute difference and the multiplier.
- Sample Size CalculatorHow many people a survey needs for a given margin of error, with the finite population correction that makes small populations cheaper.
- Probability CalculatorTwo events combined every way — both, either, neither, exactly one — plus the chance of at least one occurrence over many tries.
- Percent Error CalculatorPercent error against a known value, with percent difference beside it — they are different questions and get confused constantly.
- Grade CalculatorYour weighted course grade from up to eight categories, by percentage or by points, or the score you need on the final to reach the grade you want.
Where this one stops
Put this calculator on your site
Free, no attribution required beyond the link.
<iframe src="https://rulecalculators.com/embed/confidence-interval" width="100%" height="420" style="border:1px solid #e7e4de;border-radius:12px" title="Confidence Interval Calculator"></iframe>