Understanding the z-score calculator — concept and principle
A z-score calculator tells you how far a value lies from the mean, measured in standard deviations, and converts that distance into a percentile and p-values. It is used to compare results from different scales (a test score against a height, a lab value against its reference), to flag outliers and to run quick z-tests.
How it is calculated
- z = (x − μ) ÷ σ, where x is your value, μ the mean and σ the standard deviation, all in the same unit.
- Percentile = Φ(z) × 100, the share of a normal population below x.
- One-tailed p = 1 − Φ(|z|), the area beyond |z| in one tail.
- Two-tailed p = 2 × (1 − Φ(|z|)), the area beyond |z| in both tails.
Φ is the standard normal cumulative distribution function. The z-score itself has no unit, because the units cancel in the division.
The principle
Subtracting the mean centres the data at zero; dividing by the standard deviation removes the scale. The result is a pure number that means the same thing in every data set: z = 2 is two standard deviations above average, whether the data are exam marks or blood pressure. If the data are normal, z also follows the standard normal distribution, so its tail areas give probabilities. The absolute value |z| is used for p-values so that a value equally far below the mean gives the same p.
Worked example
- Inputs: x = 130, mean = 100, SD = 15.
- z = (130 − 100) ÷ 15 = 30 ÷ 15 = 2.
- Φ(2) ≈ 0.97725, so the percentile is 97.72%.
- One-tailed p = 1 − 0.97725 ≈ 0.02275.
- Two-tailed p = 2 × 0.02275 ≈ 0.0455.
| Value x | z |
|---|---|
| 32.5 | -4.5 |
| 65 | -2.333333333 |
| 97.5 | -0.1666666667 |
| 130 | 2 |
| 162 | 4.166666667 |
| 195 | 6.333333333 |
| 260 | 10.66666667 |
How to read the result
z = 0 is exactly average. Roughly 68% of normal values have |z| < 1, 95% have |z| < 1.96 and 99.7% have |z| < 3. Values with |z| above 2 are uncommon and above 3 are often investigated as possible outliers. In a z-test, a two-tailed p below 0.05 corresponds to |z| > 1.96. Many intelligence tests are scaled to mean 100 and SD 15, so the example corresponds to a score about 2 SD above average.
Common mistakes
- Using a sample SD from a tiny sample as if it were the true σ.
- Reading the percentile as a probability that the value is "correct".
- Reporting a one-tailed p when the hypothesis was two-sided.
Frequently asked questions
Can a z-score be negative?
Yes. A negative z means the value is below the mean; z = −1.5 is 1.5 SD below average.
What is a good z-score?
There is no universal good value; it depends on whether higher is better. It only tells you position relative to the mean.
How do I turn a z-score back into a raw value?
Use x = μ + z × σ. For z = 2, μ = 100, σ = 15, x = 130.
Sources: NIST/SEMATECH e-Handbook of Statistical Methods, Section 1.3.6.6.1 Normal Distribution · Moore, D. S., McCabe, G. P. and Craig, B. A., Introduction to the Practice of Statistics (W. H. Freeman)