A 95% confidence interval
A sample of 40 with a mean of 20.6 and a standard deviation of 5.2 gives a 95% confidence interval of 20.6 ± 1.61, or roughly 18.99 to 22.21.
Result
Fill in the fields to see your result.
A larger sample shrinks the standard error (the estimate's typical spread), which narrows the interval — that is why polling and research reports usually mention sample size alongside the margin of error. A higher confidence level, on the other hand, widens the interval: being more certain the true value is captured requires casting a wider net.
The z-score encodes exactly how wide that net needs to be for a given confidence level, based on the normal distribution — 1.96 for 95% confidence is the most commonly cited value, but the same logic applies at any level.
CI = mean ± z × (standard deviation ÷ √n)
A sample of 40 with a mean of 20.6 and a standard deviation of 5.2 gives a 95% confidence interval of 20.6 ± 1.61, or roughly 18.99 to 22.21.
Raising the confidence level to 99% widens the same interval to 20.6 ± 2.12, since more certainty requires a wider range.
If the same sampling process were repeated many times, about 95% of the resulting intervals would contain the true population value — it is a statement about the method's reliability, not a 95% probability about this one specific interval.
A larger sample gives a more precise estimate of the population, which shows up mathematically as a smaller standard error — the √n in the denominator means quadrupling the sample size only halves the margin of error, not eliminates it.
The z-distribution (used here) is a solid approximation once the sample size is around 30 or larger; for smaller samples, especially when the population standard deviation is unknown, the t-distribution accounts for the extra uncertainty more accurately.
Compute the mean and standard deviation from your data first — a descriptive statistics calculator handles that step directly.
Updated