Z-Score Calculator: Percentiles, Confidence Intervals and Sample Size
By FindMySum · Last reviewed
A z-score calculator answers one question in six different costumes. Whether you want a percentile, a confidence interval, the number of people to survey, the precision of a poll, a p-value or the 68–95–99.7 ranges, the work comes down to the standard normal distribution: converting a value into standard deviations from the mean, or converting a probability into a cut-off on the bell curve. This article walks through each mode with the calculator's defaults.
Z-scores and percentiles
The z-score of a value x from a distribution with mean μ and standard deviation σ is
z = (x − μ) ÷ σ
With the defaults, a score of 85 on a test with mean 70 and standard deviation 10 gives z = 1.5: one and a half standard deviations above average. If the scores are roughly normal, the share of people below that score is Φ(1.5), the area under the standard normal curve to the left of 1.5, which is 0.9332. The score is at about the 93rd percentile, and 6.68% of test-takers did better.
Printed z-tables give Φ to four or five decimal places for z rounded to two decimals. The calculator evaluates Φ directly from a series that is accurate to about fifteen decimal places, so there is no rounding of z and no interpolation. Its values match the NIST e-Handbook table to every digit the table prints.
Confidence interval for a mean
A sample mean is an estimate. A confidence interval puts a range around it that reflects how much the estimate would vary from sample to sample:
x̄ ± z × σ ÷ √n*
σ ÷ √n is the standard error of the mean, and z* is the critical value that leaves the right amount in the two tails: Φ⁻¹(0.975) = 1.96 for 95%. With a sample mean of 100, a standard deviation of 15 and 36 observations, the standard error is 15 ÷ 6 = 2.5, the margin is 1.96 × 2.5 = 4.90, and the 95% interval runs from 95.10 to 104.90.
Raising the confidence level widens the interval (z* is 2.576 for 99%); a larger sample narrows it, but only with the square root of n. The NIST e-Handbook gives the same formula for a known σ and switches to Student's t when σ is estimated from a small sample. This calculator implements the z version, which is also the standard large-sample approximation.
How many people to survey
For a survey estimating a percentage, the required sample size comes from Cochran's formula:
n₀ = z*² × p(1 − p) ÷ E²
where E is the margin of error you are willing to accept and p is your best guess at the true proportion. The default, 95% confidence, ±5% and p = 50%, gives n₀ = 1.96² × 0.25 ÷ 0.0025 = 384.15, which rounds up to 385 respondents. Using 50% is the cautious choice because p(1 − p) is largest there; any other guess gives a smaller number.
When the population is small, sampling a large share of it gives more information than the formula assumes, and the finite population correction reduces the requirement: n = n₀ ÷ (1 + (n₀ − 1) ÷ N). For a population of 1,000 the same survey needs only 278 responses. For large populations the correction is negligible, which is why a national poll and a city poll of the same precision need about the same number of interviews.
Remember that the result is the number of completed responses. If you expect a 20% response rate you need to contact about five times as many people.
Margin of error for a finished survey
Running the formula the other way gives the precision of a survey you have already done:
E = z × √(p(1 − p) ÷ n)*
A poll of 1,000 people with a result near 50% has a 95% margin of error of 1.96 × √(0.25 ÷ 1,000) = 0.031, the familiar ±3.1 percentage points. If the population is only 20,000 and you surveyed 1,000 of them, the finite population correction √((N − n) ÷ (N − 1)) trims this to ±3.02 points.
P-values from a z statistic
In a z-test you compute a test statistic and ask how surprising it would be if the null hypothesis held. The p-value is the tail area beyond the statistic:
- Two-tailed: p = 2 × (1 − Φ(|z|)), for "the mean differs from the reference value"
- Left-tailed: p = Φ(z), for "less than"
- Right-tailed: p = 1 − Φ(z), for "greater than"
z = 1.96 gives a two-tailed p of 0.050, the conventional boundary of significance. z = 2.5 gives 0.0124 two-tailed or 0.0062 one-tailed. Far into the tail, where p-values become tiny, the calculator switches to a continued-fraction formula so that values like 1.2 × 10⁻¹² are still accurate rather than rounded to zero.
The empirical rule (68–95–99.7)
The empirical rule mode turns a mean and a standard deviation into the three ranges people quote most: about 68% of a normal distribution lies within one standard deviation of the mean, about 95% within two and about 99.7% within three. With the defaults, a mean of 70 and a standard deviation of 10, that is 60 to 80, 50 to 90 and 40 to 100. On an IQ scale with mean 100 and standard deviation 15, the ranges are 85 to 115, 70 to 130 and 55 to 145.
The rounded percentages are a rule of thumb, so the calculator puts the exact normal shares next to them rather than silently picking one: 2Φ(1) − 1 = 68.2689%, 2Φ(2) − 1 = 95.4499% and 2Φ(3) − 1 = 99.7300%. The "95%" in the rule is really 95.45%; the cut-off that holds exactly 95% is ±1.96 standard deviations, which is why confidence intervals use 1.96 rather than 2. The table also shows the share outside each range: 0.27% beyond three standard deviations, or about one value in 370.
Reading the normal curve
Each mode that involves an area shows the bell curve with the relevant region shaded: the area below your z-score, the middle share covered by a confidence level, or the tails that make up a p-value. The horizontal axis is in standard deviations, so the same picture applies whatever your units are.
More questions
What is the difference between a z-score and a t-score?
Both measure distance from a mean in units of spread. A z-score uses the population standard deviation (or a large sample) and is compared with the normal distribution. A t-score uses a standard deviation estimated from a small sample and is compared with Student's t distribution, which has heavier tails, so its critical values are larger: about 2.26 instead of 1.96 for a 95% interval with 10 observations.
Can a z-score be greater than 3?
Yes. A z-score has no upper limit, but values beyond ±3 are rare in normally distributed data: only about 0.27% of values lie more than three standard deviations from the mean. In quality control and outlier screening, |z| above 3 is a common flag for a value worth checking, though it may be perfectly genuine in heavy-tailed data.
Why do polls report a margin of error of about 3%?
Because many national polls interview around 1,000 people. At 95% confidence with the worst-case proportion of 50%, the margin is 1.96 × √(0.25 ÷ 1,000) ≈ 3.1 percentage points. The margin applies to each reported percentage; the gap between two candidates has a larger uncertainty, roughly double for a close two-way race.
Does the margin of error cover all survey error?
No. It measures only random sampling error, assuming a simple random sample. It says nothing about who refused to answer, how questions were worded, people who can't be reached, or answers that are not honest. Professional surveys adjust for some of these with weighting and design effects, which usually widen the real uncertainty beyond the textbook figure.
What is the 68–95–99.7 rule?
In a normal distribution about 68.27% of values lie within one standard deviation of the mean, 95.45% within two and 99.73% within three. It is a quick check on any z-score result: z = 2 should put a value near the 97.7th percentile, because half of the remaining 4.55% lies in each tail. Choose the empirical rule mode to get the three ranges for your own mean and standard deviation.
Does the empirical rule work for any data set?
No. The 68–95–99.7 shares hold only for a normal (bell-shaped) distribution. Skewed data such as incomes or house prices can have far more than 0.3% of values beyond three standard deviations. For any distribution at all, Chebyshev's inequality guarantees only that at least 75% lie within two standard deviations and at least 88.9% within three.
Is a p-value the probability that the null hypothesis is true?
No. It is the probability of getting a test statistic at least as extreme as the one observed if the null hypothesis were true. A p-value of 0.03 means results this far out would happen about 3% of the time by chance alone under the null. Whether the null is likely to be true also depends on prior evidence, which the p-value does not include.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.