Home / Math / Z-Score Calculator
Z-Score Calculator: Z-Score, Percentile and P-Value
Find how many standard deviations a value lies from the mean, then read off the normal-distribution percentile, the tail areas and the two-tailed p-value. You can also start from a z-score or a percentile.
What a z-score measures
A z-score re-expresses a value as the number of standard deviations it sits above or below the mean:
z = (x − μ) ÷ σ
A score of 85 on a test with mean 70 and standard deviation 10 has z = 1.5: it lies one and a half standard deviations above average. Because z-scores are unit-free, they let you compare values from different scales, such as an exam mark and a height. A z-score of 0 is exactly average, positive values are above the mean and negative values are below it.
For sample data, the mean and standard deviation come from the sample; the standard deviation calculator computes both.
From z-score to percentile and p-value
If the data follow a normal (bell-curve) distribution, each z-score maps to a cumulative probability, written Φ(z). Φ(1.5) is about 0.9332, meaning roughly 93.3% of values lie below a z-score of 1.5. The upper tail, P(Z > z), is 1 − Φ(z). The two-tailed p-value is twice the smaller tail and answers "how often would a value this far from the mean, in either direction, occur by chance?" The best-known benchmark is z = 1.96, where Φ is 0.9750 and the two-tailed p-value is 0.05.
| Within ± z | Share of a normal distribution |
|---|---|
| 1 | 68.27% |
| 2 | 95.45% |
| 3 | 99.73% |
How the probabilities are computed
The calculator does not use a lookup table. It evaluates the normal cumulative distribution with a convergent series, Φ(x) = ½ + φ(x) × (x + x³/3 + x⁵/(3·5) + x⁷/(3·5·7) + …), where φ is the bell-curve density, summing terms until they stop changing. For |z| above 6 the tail uses an asymptotic expansion instead. In testing against a reference implementation, probabilities agree to better than 12 decimal places for |z| up to 6, the relative error of the far tail is about one part in ten million at |z| = 6, and it is a few parts per million between 6 and 8. The reverse direction, from percentile to z, starts from a rational approximation and applies two Halley refinement steps. Displayed values are rounded to six decimals.
Common mistakes
- Assuming normality. A percentile from the normal curve is only meaningful if the data are roughly bell-shaped. Skewed data, such as incomes, can produce misleading percentiles.
- Mixing population and sample. If σ is estimated from a small sample, a t-distribution is more appropriate for inference than the normal curve.
- One tail or two. A p-value of 0.025 in one direction is 0.05 in both. State which one your test uses before comparing with a threshold.
- Reading a z-score as a probability. The z-score is a distance; the probability comes from the area under the curve.
- Using the wrong standard deviation. For the average of a sample, the relevant spread is the standard error σ ÷ √n, not σ.
Worked example
An exam has a mean score of 70 and a standard deviation of 10. A student scores 85. Where does that place the student?
Inputs
| Start from | A raw score, mean and standard deviation |
|---|---|
| Raw score x | 85 |
| Mean μ | 70 |
| Standard deviation σ | 10 |
Result
This value is between one and two standard deviations from the mean, above it.
| Working | z = (x − μ) ÷ σ = (85 − 70) ÷ 10 |
|---|---|
| Percentile (area to the left) | 93.3193% |
| P(Z < z) | 0.933193 |
| P(Z > z) | 0.066807 |
| Two-tailed p-value | 0.133614 |
| Share within ±|z| of the mean | 86.6386% |
- Assumes a normal distribution. For other shapes, a z-score is still a valid distance measure but the percentile will not match.
Accuracy note: Results use standard double-precision arithmetic, so very large or very small values may be rounded. Check important results by another method.
Frequently asked questions
How do I calculate a z-score?
Subtract the mean from the value and divide the result by the standard deviation. A score of 85 with a mean of 70 and a standard deviation of 10 gives a z-score of 1.5.
What is a good z-score?
It depends on what you are measuring. A z-score near zero is typical, and values beyond about plus or minus 2 are unusual in a normal distribution, which only about 5% of values exceed.
How do I convert a z-score to a percentile?
Find the area under the standard normal curve to the left of the z-score. For z = 1.96 that area is 0.9750, so the value is at about the 97.5th percentile.
What is the z-score for the 95th percentile?
The z-score for the 95th percentile is about 1.645. For a two-sided 95% range the cut-off is 1.96, because 2.5% is left in each tail.
Can a z-score be negative?
Yes. A negative z-score means the value is below the mean. For example, a z-score of −1 places the value about 15.9% of the way up the distribution.
Related calculators
References and sources
- NIST/SEMATECH e-Handbook of Statistical Methods: the normal distribution and standard normal tables. Link
- Acklam, P. J., an algorithm for computing the inverse normal cumulative distribution function (rational approximation used as a starting point).