Skip to content
BestCalculators LogoBestCalculators
Free online calculators and converters

Math & Statistics

Confidence Interval Calculator: Margin of Error Around a Mean

Build a confidence interval around a sample mean, with the margin of error, the t or z multiplier and the sample size a tighter interval would need.

The average of your measurements. The interval is built around it and is always symmetric about it.

The spread of the individual values, not of the mean. Use the sample form, dividing by n − 1.

How many observations the mean came from. This drives the interval far more than the standard deviation does.

How often an interval built this way contains the true mean, over many repeated samples. Higher confidence buys a wider interval and nothing else.

Optional. Used to work out the sample size that would deliver it, in the same units as the mean.

Margin of error

3.9977

Plus or minus this around 68.4, giving 64.4023 to 72.3977. It is the multiplier times the standard error, and nothing else enters into it.

Lower bound
64.4023

The bottom of the interval. A value below this is not ruled out — it is simply less consistent with the sample than anything inside.

Upper bound
72.3977
Standard error of the mean
1.9764

The spread of the mean itself, which is the spread of the data divided by √n. This is the number people mix up with the standard deviation.

t multiplier used
2.0227

For 39 degrees of freedom at 95% confidence. It always exceeds the z value below, and the gap closes as the sample grows.

z multiplier, for comparison
1.96

What a large sample converges to — 1.96 at 95% confidence. Using it on a small sample is the commonest way an interval ends up too narrow.

Degrees of freedom
39

One less than the sample size, because the mean has already been estimated from the same data.

Full width of the interval
7.9954
Margin as a share of the mean
5.84%

The form a poll or a report usually quotes. Under 5% is generally treated as a tight estimate, though what counts as tight depends entirely on the decision it feeds.

Sample size for the margin you wanted
151observations

To reach ±2 at the same confidence. Because n sits under a square root, halving the margin needs four times the data.

Sample size to halve the current margin
160observations

Four times what you have. This is the single most useful fact about sampling, and the reason huge surveys stop getting meaningfully better.

Significance level, α
0.05

The chance an interval built this way misses the true mean. Split between the two tails, so each end carries half of it.

Intervals in 100 that contain the true mean
95

The correct reading of the confidence level: it describes the procedure over many samples, not the probability that this one interval is right.

How to use this calculator

  1. Enter your Sample mean into the first field to establish the center point of your interval.
  2. Input your Sample standard deviation, ensuring you have used the sample form that divides by n minus 1.
  3. Type your Sample size into the third box to reflect the number of observations in your dataset.
  4. Select your desired Confidence level from the drop-down menu, keeping 95 percent as the standard default.
  5. Optionally enter a preferred Margin of error to calculate the exact sample size needed to achieve it.

Understanding Your Confidence Interval

When you calculate a confidence interval calculator output, you are generating a range of values that likely contains the true population mean. A sample mean is merely a single point estimate derived from a fraction of a larger group. Because sampling variation is inevitable, that single number rarely matches the true population parameter exactly. By building an interval around your sample mean, you acknowledge uncertainty and provide a plausible bracket where the true value resides.

The width of this bracket depends heavily on three factors: the variability of your data, the size of your sample, and your chosen confidence level. The process relies on the standard error of the mean, which measures how much your sample means would fluctuate if you repeated the study multiple times. Dividing the sample standard deviation by the square root of the sample size yields this standard error. Multiplying that figure by a critical value gives you the final margin of error.

How the Multiplier Shapes Your Results

A subtle mechanism governs the transformation from standard error to margin of error: the choice of distribution. When working with sample data where the population standard deviation is unknown, the tool uses a t distribution rather than a normal z distribution. This accounts for the extra uncertainty introduced by estimating the standard deviation from a limited sample. The critical value or t multiplier is determined by your degrees of freedom, which equals your sample size minus one.

As your sample size grows, the t distribution converges toward the normal z distribution, making the difference negligible for large samples. However, for smaller samples, using the correct t multiplier prevents you from underestimating your uncertainty. The resulting interval is always symmetric, stretching equally above and below your sample mean by the exact margin of error.

Choosing a confidence level involves a direct trade-off between precision and certainty. A 95 percent level means that if you drew one hundred different samples and built an interval for each using the exact same method, roughly ninety-five of those intervals would capture the true population mean. Selecting a 99 percent level demands a wider interval to increase your guarantee, while a 90 percent level accepts a narrower band and a higher risk of missing the target.

Many practitioners default to 95 percent because it strikes a practical balance between risk and reward. Clinical trials and safety-critical engineering often push for 99 percent or higher to guard against catastrophic errors, accepting the cost of wider, less precise intervals. Screening programs might drop down to 90 percent to catch more potential flags, knowing that false positives will be filtered out in later stages.

Confidence LevelSignificance AlphaTypical ApplicationInterval Width Impact
90%0.10Exploratory screening and early researchNarrowest, highest risk of missing true mean
95%0.05Standard academic and business defaultBalanced precision and reliability
99%0.01Clinical trials and quality controlWide, highly reliable
99.9%0.001High-stakes safety and legal verificationWidest, maximum certainty required

Common Pitfalls and Limitations

A frequent mistake is interpreting a confidence interval as a probability statement about the true mean itself. Once calculated, your specific interval either contains the true mean or it does not; the true mean is a fixed, unknown constant, not a random variable. Saying there is a 95 percent probability that the true mean falls within your specific interval is technically incorrect frequentist shorthand.

Furthermore, these calculations assume your data points are independent and identically distributed, and that your sample was drawn randomly from the population of interest. If your sampling method introduces bias, such as surveying only voluntary respondents, a narrow interval merely gives you a precise estimate of a biased subset. When dealing with severe skewness or extreme outliers in small samples, consult a statistician rather than relying on standard interval formulas.

The formula

standard error = s ÷ √nmargin of error = t × standard error, with t from n − 1 degrees of freedominterval = mean ± margin of errorn for a target margin = (z × s ÷ margin)², so the cost grows with the square

Frequently asked questions

What is the difference between a confidence interval and a tolerance interval?

A confidence interval estimates the plausible location of the population mean, whereas a tolerance interval estimates where a specified percentage of individual data points will fall. People often confuse the two when trying to predict future observations rather than summarizing group averages. If you need to know where individual measurements lie, a confidence interval will be far too narrow for your needs.

Why does changing the confidence level change the width of the interval?

To be more confident that your interval contains the true mean, you must cast a wider net. The critical multiplier scales up as you demand higher percentages like 99 percent or 99.9 percent, which directly inflates the margin of error. Higher confidence can only be purchased by sacrificing precision in the form of a broader range.

Can a confidence interval ever be too narrow?

An interval can be clinically or practically uninformative if it is extremely wide, but a narrow interval derived from a massive sample size is generally desirable. However, if your sample size is small and your variance is low due to artificial data manipulation or severe selection bias, a narrow interval provides a false sense of security. Always verify that your sample size and data collection methods justify the precision of your output.

What happens to the margin of error if my sample standard deviation increases?

A higher standard deviation indicates greater spread and variability among your individual measurements. Because the standard error is directly proportional to the standard deviation, more dispersed data leads to a larger margin of error. This wider interval reflects the added uncertainty of trying to estimate a mean from noisy, unpredictable data.

How do I know if I should use a z multiplier or a t multiplier?

The t distribution is used when the population standard deviation is unknown and must be estimated from your sample, which applies to almost all real-world scenarios. The tool automatically applies the correct t multiplier based on your degrees of freedom. The z multiplier is only appropriate if you somehow know the true population standard deviation in advance or possess a sample size in the thousands where the two distributions become indistinguishable.

Sources

Last reviewed . Results are for general guidance and are not professional advice.