Confidence Interval Z-Score Formula
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator computes the z-score needed to build a confidence interval for a population mean when the population standard deviation is known. You enter the desired confidence level (as a percentage, e.g., 95) and the calculator returns the corresponding z-value (e.g., 1.960) that you would multiply by the standard error to get the margin of error. It also shows the two-tailed critical value and the one-tailed value for reference.
Formula
The z-score for a confidence interval is the critical value that cuts off the central region of the standard normal distribution. For a two-tailed interval (the usual case), the formula is:
z = Φ⁻¹(1 – α/2)
where:
- α = 1 – (confidence level as a decimal). For 95% confidence, α = 0.05.
- Φ⁻¹ = the inverse of the standard normal cumulative distribution function (also called the quantile function or the z-score table lookup).
- z = the critical value you use in the margin of error formula.
For a one-tailed interval (used when you only care about an upper or lower bound), the formula becomes:
z = Φ⁻¹(1 – α)
In practice, you almost never compute this by hand—you use a z-table or a calculator. The table gives the area to the left of a z-value. For a two-tailed 95% interval, you want the z that leaves 2.5% in each tail, so you look up the value that leaves 97.5% to the left. That value is 1.960.
Worked Example
Using the default 95% confidence level:
- Convert 95% to a decimal: 0.95.
- Compute α = 1 – 0.95 = 0.05.
- For a two-tailed interval, α/2 = 0.025.
- Find the z-score such that the area to its left is 1 – 0.025 = 0.975.
- From the standard normal table, the z-score for 0.9750 is 1.960.
So the two-tailed z-score is 1.960. The one-tailed z-score for 95% confidence (area to the left = 0.95) is 1.645. These are the numbers you would use in the margin of error formula:
Margin of error = z × (σ / √n)
For example, if σ = 10 and n = 25, the standard error is 10/√25 = 2.0. The margin of error at 95% confidence is 1.960 × 2.0 = 3.92. The confidence interval is then sample mean ± 3.92.
When to Use a Z-Score vs. a T-Score
The z-score is only valid when you know the population standard deviation (σ). In real research, you rarely know σ—you estimate it from the sample standard deviation (s). When you use s, the correct distribution is the t-distribution, not the normal. The t-distribution is wider, reflecting the extra uncertainty from estimating σ.
As a rule of thumb:
- Use a z-score when σ is known (e.g., from a large pilot study or a known population parameter).
- Use a t-score when σ is unknown and you use s, regardless of sample size.
- For very large samples (n > 30), the t-distribution approaches the normal, so the difference is negligible—but the t-score is still more correct.
Many textbooks teach the z-score for large samples (n ≥ 30) even when σ is unknown, because the difference is small. However, modern statistical practice recommends the t-score whenever σ is estimated.
How to Choose the Right Confidence Level
The confidence level is the probability that the interval contains the true parameter if you repeated the sampling many times. Common choices:
- 90% – z = 1.645 (narrower interval, less certainty)
- 95% – z = 1.960 (standard default)
- 99% – z = 2.576 (wider interval, more certainty)
There is no universally “correct” level. It depends on how much risk of error you can tolerate. A 95% level is conventional in many fields, but if the cost of being wrong is high (e.g., medical trials), you might choose 99%. If you need a tighter estimate and can accept more risk, 90% might be appropriate.
Common Mistakes and Misconceptions
Misinterpreting the confidence level: A 95% confidence interval does not mean there is a 95% chance the true mean lies in this particular interval. It means that if you repeated the study many times, 95% of the intervals you construct would contain the true mean. The true mean is fixed; the interval is random.
Using the wrong tail: For a two-tailed interval, you must divide α by 2. A common error is using the one-tailed z (1.645) for a 95% two-tailed interval, which produces a narrower interval than warranted.
Ignoring the standard deviation: The z-score alone is not the margin of error. You must multiply by the standard error (σ/√n). Forgetting to divide by √n is a classic mistake.
Unit mix-ups: If your data are in different units (e.g., some in inches, some in centimeters), the standard deviation and mean will be wrong. Always convert all values to the same unit before computing.
Limitations of the Z-Score Formula
The z-score formula assumes the sampling distribution of the mean is normal. That holds if the population is normal, or if the sample size is large enough (central limit theorem). For small samples from a non-normal population, the z-score can be misleading.
Also, the formula assumes the data are independent and randomly sampled. If your sample is biased, no formula can fix it. The z-score also only applies to the mean, not to medians, proportions, or other statistics—those require different formulas.
Finally, the z-score is a point value. It does not account for multiple comparisons. If you construct many intervals, the overall error rate increases.
Alternatives to the Z-Score
- T-score: Use when σ is unknown. Slightly wider intervals.
- Bootstrap: A resampling method that does not assume normality. Works for many statistics, not just the mean.
- Bayesian credible interval: Interprets the interval as a probability statement about the parameter, given prior beliefs.
- Nonparametric methods: For skewed data or ordinal scales, use sign tests or rank-based intervals.
For most real-world applications, the t-score is the right choice. The z-score is mainly useful when you have a known population standard deviation—a rare situation outside of textbooks.
Frequently Asked Questions
What is the z-score for a 95% confidence interval?
The two-tailed z-score is 1.960. The one-tailed is 1.645. The two-tailed value is used for the usual symmetric interval around the mean.
Why is the z-score 1.96 for 95% confidence?
Because 95% of the area under the standard normal curve lies between z = -1.96 and z = +1.96. That leaves 2.5% in each tail. The value 1.96 is the quantile that cuts off the central 95%.
Can I use the z-score for any sample size?
Only if the population is normal or the sample size is large (n ≥ 30). For small samples, the t-distribution is safer, especially if the population is not normal.
What is the difference between z-score and t-score?
The z-score uses the known population standard deviation. The t-score uses the sample standard deviation and has heavier tails, which accounts for the extra uncertainty. As sample size grows, they converge.
How do I find the z-score without a calculator?
Use a standard normal (z) table. For a two-tailed 95% interval, find the value where the cumulative probability is 0.975. That value is 1.96. For 90%, look up 0.95 (1.645). For 99%, look up 0.995 (2.576).
What if my data are not normally distributed?
If the sample is large, the central limit theorem says the sample mean is approximately normal, so the z-score still works. For small samples, consider a nonparametric method or a transformation.
Related
Formula used
in cl | Confidence level (%) | % | 95 | 0 out z_two | Two-tailed z-score | - | -norminv((1 - cl/100)/2) | 3 out z_one | One-tailed z-score | - | -norminv(1 - cl/100) | 3
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.