Z-Score Calculator
How many standard deviations a value sits from the mean.
The formula
μ — the mean
σ — the standard deviation
The subtraction re-centres the data so the mean sits at zero; the division rescales it so one unit is one standard deviation. The result is unitless, which is what makes z-scores comparable across measurements that have nothing else in common.
Reading a z-score
- Sign — positive means above the mean, negative below, zero exactly at it.
- Magnitude — how many standard deviations away. |z| under 1 is unremarkable; over 2 is uncommon; over 3 is rare in most data.
For roughly normal data those rough labels become specific: about 68% of values have |z| under 1, about 95% under 2, and about 99.7% under 3. For data that is not normal, none of those percentages hold. The z-score itself is still perfectly well defined — it is the probability interpretation that requires the assumption.
What z-scores are actually for
Comparing scores from different scales. A mark of 78 on a test with mean 70 and standard deviation 4 gives z = 2. A mark of 85 on a test with mean 75 and standard deviation 10 gives z = 1. The 78 is the stronger performance relative to its cohort, even though the raw number is lower.
The same logic drives standardisation before clustering or regression, where variables measured in different units would otherwise contribute in proportion to their arbitrary scales.
z-scores for outlier detection
Flagging anything with |z| above 3 is a common rule, and it has a weakness worth knowing: the outlier contributes to the standard deviation being used to judge it. One extreme value inflates σ, which shrinks its own z-score — sometimes below the threshold that was meant to catch it. With very small samples this is severe; the maximum possible |z| in a sample of size n is bounded by (n − 1)/√n, so in a sample of 10 no value can ever reach z = 3.
The IQR rule does not have this problem, because the quartiles are unaffected by how far out the extremes sit.
Worked examples
A single value against a known mean and SD
z = (85 − 70) ÷ 10 = 1.5. The value sits one and a half standard deviations above the mean. If the distribution is roughly normal, about 93% of values fall below it.
Below the mean
z = (60 − 70) ÷ 10 = −1. Exactly one standard deviation below — entirely ordinary. Roughly a sixth of values in a normal distribution sit lower.
Questions
Should I use the sample or population standard deviation?
Strictly, the z-score is defined with population parameters. When you only have a sample — which is usually — you substitute x̄ and s, and the result is technically a t-like statistic rather than a true z. For descriptive purposes the distinction rarely matters; for inference on small samples it does. The data-set mode above lets you choose.
Can a z-score be greater than 3?
Yes, though rarely in normal data. Note the sample-size ceiling mentioned above: in a sample of n values no z-score can exceed (n − 1)/√n, so small samples cannot produce large ones no matter how extreme a value is.
Why is my z-score undefined?
The standard deviation is zero, which happens when every value is identical. Dividing by it has no answer — and rightly so, since with no spread there is no meaningful "number of standard deviations away".