Skip to content
Other

99% Confidence Interval Calculator

Enter your sample statistics to get the confidence interval lower bound, upper bound, and margin of error. Choose between a mean interval using the z-distribution (known population standard deviation) or the t-distribution (estimated standard deviation), or switch to proportion mode to get a Wilson score interval for a count out of a total. The confidence level defaults to 99% but you can adjust it from 80% to 99.9%. Results update as you type, and the steps panel shows every line of arithmetic.

Your details

Use the z interval when you know the true population standard deviation. Use the t interval (the most common) when you only have the sample standard deviation. Use Proportion for a success count out of a total.
The arithmetic average of your sample (x-bar).
The sample standard deviation. The t interval accounts for the extra uncertainty this introduces.
Number of observations. Needs at least 2 for the t interval (df = n - 1).
Lower boundWide interval
44.9667

The lower limit of the confidence interval

Upper bound55.0333
Margin of error5.0333
Critical value2.7569
Standard error1.8257
2.75690.3% above · Standard deviations from mean

99% CI: [44.9667, 55.0333]

  • The 99% confidence interval runs from 44.9667 to 55.0333, with a margin of error of 5.0333.
  • With 30 observations, the t critical value on 29 degrees of freedom is 2.7569. As n grows, this approaches the z critical value (2.5762).
  • A wider confidence interval means more uncertainty in the estimate. Increasing the sample size is the most reliable way to shrink the margin of error.

Next stepIf the interval is too wide for your purpose, you can estimate the sample size needed to achieve a target margin of error: n = (z* x sigma / ME)^2 for means, or n = z*^2 x p(1-p) / ME^2 for proportions.

Formula

xˉ±z∗σn,xˉ±tn−1∗sn,p^W±z∗p^(1−p^)/n+z∗2/(4n2)1+z∗2/n\bar{x} \pm z^{*} \frac{\sigma}{\sqrt{n}}, \quad \bar{x} \pm t^{*}_{n-1} \frac{s}{\sqrt{n}}, \quad \hat{p}_{W} \pm z^{*}\frac{\sqrt{\hat{p}(1-\hat{p})/n + z^{*2}/(4n^2)}}{1 + z^{*2}/n}

Worked example

A lab measures 30 samples with a sample mean of 50 and sample SD of 10. For a 99% confidence interval: df = 29, t* = 2.756, SE = 10 / sqrt(30) = 1.826, ME = 2.756 x 1.826 = 5.033. The interval is 50 - 5.033 = 44.967 to 50 + 5.033 = 55.033.

What is a confidence interval?

A confidence interval (CI) is a range of values, calculated from sample data, that is likely to contain the true population parameter. A 99% confidence interval means that if you repeated the same sampling process 100 times, approximately 99 of the resulting intervals would contain the true parameter. The interval does not mean there is a 99% probability that the true value lies in this specific interval, the true value is either in the interval or it is not. What the confidence level describes is the long-run reliability of the method used to construct the interval. A 99% CI is wider than a 95% CI because you need a larger net to catch the true value with higher certainty.

z interval versus t interval for a mean

When the population standard deviation (sigma) is known, the z interval is theoretically correct and uses the standard normal distribution to find the critical value. In practice, sigma is almost never known, so the t interval is standard. It uses the Student's t distribution, which has heavier tails than the normal distribution to account for the additional uncertainty of estimating sigma from the sample. The t distribution has a shape parameter called degrees of freedom (df), which equals n minus 1. As df grows, the t distribution approaches the normal distribution, so for n above about 100 the two methods give nearly the same answer. For a 99% CI with 29 degrees of freedom, the t critical value is 2.756 compared to the z critical value of 2.576, making the t interval about 7% wider.

Wilson score interval for proportions

For a proportion, the classic Wald formula (p-hat plus or minus z times the square root of p-hat times (1 minus p-hat) divided by n) performs poorly when the observed proportion is near 0 or 1, or when the sample is small. The Wilson score interval is the preferred alternative recommended by statisticians. It is derived by inverting the score test and does not have the same coverage problems as the Wald formula. This calculator uses the Wilson interval for all proportion calculations. The formula adds a correction term involving z-squared divided by 2n to the numerator and z-squared divided by n to the denominator, which shifts the center slightly toward 0.5 and keeps the bounds within the valid range of 0 to 1.

How to reduce the margin of error

The margin of error is directly proportional to the critical value and the standard error, and inversely proportional to the square root of the sample size. This square-root relationship means you must quadruple the sample size to halve the margin of error, which is why large precision gains become expensive. You can also reduce the margin of error by lowering the confidence level (for example from 99% to 95%), but this increases the risk that the interval misses the true value. In research design, the target margin of error and confidence level are usually set first, and then the required sample size is back-calculated: n = (z* times sigma divided by ME) squared for means, or n = z-squared times p times (1 minus p) divided by ME-squared for proportions.

Common confidence levels and critical values

Confidence levelz* (z critical)t* (df = 29)Notes
80%1.2821.311 Rarely used in practice
85%1.4401.483
90%1.6451.699 Common in social sciences
95%1.9602.045 Most common in research
99%2.5762.756 Standard for high-stakes studies
99.9%3.2913.396 Particle physics threshold

Critical z values (used for large samples or known sigma) and typical t values for n = 30 (df = 29).

Frequently asked questions

What is the z critical value for a 99% confidence interval?

The z critical value for a 99% two-sided confidence interval is 2.576. This comes from the fact that 99% of the area under the standard normal curve lies between -2.576 and +2.576. The remaining 1% is split equally between the two tails, so each tail contains 0.5% of the distribution.

When should I use the t interval instead of the z interval?

Use the t interval whenever you are estimating a population mean and you do not know the true population standard deviation (sigma). In practice this is almost always the case. The t interval uses the sample standard deviation (s) as an estimate of sigma and accounts for the extra uncertainty by using the t distribution with n minus 1 degrees of freedom. Only use the z interval when sigma is genuinely known from prior large-scale studies or from the design of a measuring instrument.

Why is a 99% confidence interval wider than a 95% one?

A higher confidence level requires a larger critical value to ensure the interval captures the true parameter more often. For a 95% CI the z critical value is 1.960, while for a 99% CI it rises to 2.576. Because the margin of error equals the critical value times the standard error, a larger critical value produces a wider interval. In other words, you pay for greater confidence with reduced precision.

Does a 99% confidence interval mean there is a 99% chance the true value is inside it?

No. Once a confidence interval is calculated from data, the true parameter is either inside it or it is not. The 99% refers to the procedure, not to a single interval: if you used this method to construct intervals from 100 independent samples, you would expect about 99 of those intervals to contain the true parameter. This is a subtle but important distinction from Bayesian credible intervals, which do express a probability about the parameter given the data.

What is the margin of error and how is it calculated?

The margin of error (ME) is half the width of the confidence interval. It equals the critical value (z* or t*) multiplied by the standard error. For a mean with known sigma, ME = z* times sigma divided by sqrt(n). For a mean with unknown sigma, ME = t* times s divided by sqrt(n). A smaller margin of error means the interval is more precise. Increasing the sample size is the most reliable way to shrink it because the standard error decreases as n increases.

Why does this calculator use the Wilson interval for proportions?

The classic Wald proportion interval (p-hat plus or minus z times sqrt(p-hat(1-p-hat)/n)) can produce intervals that fall outside 0 to 1 and has poor coverage when the true proportion is near 0 or 1, or when the sample is small. The Wilson score interval avoids these problems. It is obtained by inverting the score test and consistently achieves coverage close to the nominal level across a wide range of sample sizes and true proportions, making it the recommended default in modern statistics textbooks.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…