CCalclabhub

Statistics

How To Calculate A Z-Score

A z-score restates a value as how many standard deviations it sits from the mean. That rescaling removes the original units, which is exactly what lets you compare things that were never commensurable.

Quick Answer

z = (x - mean) / standard deviation

x
The value you are standardising
mean
Average of the distribution the value came from
SD (sigma)
Standard deviation of that same distribution
z
Signed distance from the mean, measured in SD units

Subtract the mean from your value, then divide by the standard deviation. A mark of 85 in a distribution averaging 75 with a standard deviation of 10 sits 10 points above the mean, which is 1.0 standard deviations, giving z = 1. Positive means above average, negative below, zero exactly at the centre — and because the units cancel, that single number can be compared against a score from a completely different test or population.

What Is A Z-Score?

Every measurement comes with its own scale, and comparing across scales is where intuition fails. An exam score of 85 means one thing in a class averaging 75 and something quite different in a class averaging 82. Dividing away both the location and the spread leaves a pure number — how far from typical this value sits, expressed in the units of that population's own variability. That number is the z-score, and it travels well.

The calculation itself is two steps. Subtracting the mean recentres the distribution so that the average becomes zero; dividing by the standard deviation rescales so that one unit equals one standard deviation of spread. Nothing about the shape changes in this transformation — an asymmetric distribution stays asymmetric — which is why z-scores carry no information about normality no matter how often they are described as if they did.

Reading the sign is straightforward but worth stating plainly. Positive means above the mean, negative below, and the magnitude answers how many standard deviations' worth. A z of 2 is a value two SDs above average; a z of -1.3 sits that far below. The absolute value answers a different and often more useful question: how unusual is this, irrespective of direction.

A common misuse is treating z as though it automatically yields a percentile. Converting a z-score to a percentage of the population below it requires knowing the shape of the distribution — for a normal one, a table or an error function does the job, and jumping to "z = 1 means the 84th percentile" silently assumes exactly that bell shape. On skewed data such as household income or hospital stays, the same z-score corresponds to a very different percentile.

The empirical rule gives rough expectations when the distribution is at least approximately bell-shaped: roughly 68 percent of values fall within one standard deviation, 95 percent within two, and 99.7 within three. Those figures are properties of the normal curve, not of z-scores as such. Using them as a general guide is fine; quoting them as precise statements about your particular data is not.

Outlier thresholds built on z-scores inherit the same sensitivity problem. A familiar rule flags anything beyond three standard deviations, but the mean and standard deviation that go into the calculation are themselves pulled by extreme values. A single wild observation inflates the SD and thereby reduces every z-score, which can hide the very point you were looking for. Robust alternatives based on the median and interquartile range behave better here.

The standard deviation chosen must match the population the value belongs to. Mixing a sample SD into a claim about a population, or using last year's spread with this year's mean, produces a number with no clear interpretation. This is the error that most often survives review, because the arithmetic is correct even though the comparison is not.

There is also a subtlety about which SD to divide by. If your data is the entire population, divide by the population SD with n in the formula. If it is a sample estimating an unknown population spread, the unbiased version dividing by n - 1 is usually intended. The two differ materially in small samples — with five observations the difference in the SD is already more than 11 percent — and choosing wrongly shifts every z-score by that same factor.

None of this requires the original units to be meaningful on their own. Because they cancel, z-scores let you ask whether a commute is more unusual than a temperature reading, or whether a fund's return was more extreme than a player's scoring season. That comparability is the entire reason the statistic exists, and it is worth protecting by being explicit about which mean and which standard deviation produced it.

Formula

z = (x - mean) / SD

Recentre then rescale. The result carries no units because the numerator and denominator share them.

SymbolMeaning
xValue being standardised
meanArithmetic average of the distribution
SDStandard deviation

x = mean + z x SD

The same relationship inverted, for turning a target z back into a raw threshold.

SymbolMeaning
xRaw value corresponding to that z

|z| = |x - mean| / SD

How unusual the value is, regardless of whether it sits above or below the mean.

SymbolMeaning
|z|Absolute number of standard deviations

How To Calculate A Z-Score

  1. 1

    Fix the reference distribution first

    Decide what population the value belongs to. The mean and standard deviation must both describe that same population, or the result describes nothing.

  2. 2

    Subtract the mean

    x - mean gives the signed deviation in original units. Here 85 - 75 = 10, so the value sits ten points above average. Keep the sign; it is the entire directional content.

  3. 3

    Divide by the standard deviation

    10 / 10 = 1.0. Read the result as "one standard deviation above the mean" rather than as a bare number, which keeps the interpretation attached to the figure.

  4. 4

    Sanity-check the magnitude

    Most ordinary observations land between -2 and 2. Anything beyond roughly 3 is genuinely rare in bell-shaped data, and beyond that you should suspect a mismatch of distribution before celebrating a finding.

  5. 5

    State whether normality is being assumed

    If you go on to quote a percentile, that step needs the bell curve. Say so explicitly, because the z-score by itself justifies no such statement.

Examples

Example 1: A test score of 85 in a class averaging 75

Value
85
Mean
75
Standard deviation
10
StepCalculationResult
Distance above the mean85 - 7510
Expressed in SD units10 / 101

Result: z = 1 — one full standard deviation above the class average.

Example 2: Two scores on different tests, made comparable

First test
78 with mean 70, SD 8
Second test
88 with mean 80, SD 12
StepCalculationResult
Standardising the first result(78 - 70) / 81
Standardising the second(88 - 80) / 120.6667
Comparing the two1 > 0.6667the first is the stronger result

Result: The first score is the better result despite being the lower raw number: 1 against 0.6667 standard deviations above their respective means.

Example 3: Working backwards to a cutoff

Target
1.5 SD below the mean
Mean
40
Standard deviation
4
StepCalculationResult
Apply the inverted relationship40 + (-1.5) x 434

Result: 34 is the raw value sitting 1.5 standard deviations below a mean of 40.

Calculator

Z-score

1

Distance from the mean (original units)
10
Distance ignoring direction (|z|)
1

Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.

Prefer a full-width tool? Open the A Z-Score calculator page.

Common Mistakes

  • Treating z as a percentile without assuming a shape

    Converting z into "better than X percent" requires the normal distribution. The z-score alone rescales; it does not tell you how much of the population sits below.

  • Mixing populations between the value and the statistics

    Using this year's result with last year's mean, or a national SD with a school-level score, produces a technically correct number that answers no real question.

  • Using the sample SD where the population SD was intended

    The two differ by a factor of the square root of n over n - 1. In small samples that gap is large enough to move a z-score across a significance threshold.

  • Ignoring that outliers distort the input statistics

    The mean and standard deviation are themselves dragged by extreme values, so a genuine outlier can inflate the SD enough to hide itself from a three-SD rule.

  • Comparing z-scores computed on different dispersion conventions

    If one group used population SD and another used sample SD, the resulting z-scores are not on the same footing even though both look dimensionless and comparable.

FAQ

What does a negative z-score mean?

The value sits below the mean. A z of -1.5 means it is one and a half standard deviations below average. Nothing else changes; the magnitude still measures how unusual it is.

Can a z-score be larger than 3?

Yes. Values beyond 3 do occur, though they are rare in bell-shaped data. When one appears, check whether the value belongs to the population the mean and SD describe before treating it as a genuine extreme.

Does calculating a z-score make my data normal?

No. Standardising shifts and rescales, leaving the shape untouched. Skewed data stays skewed, and any percentile interpretation still needs a distributional assumption.

What standard deviation should I divide by?

Use the population SD if your data is the whole population; use the unbiased sample form dividing by n - 1 when estimating from a sample. Be consistent and say which you used.

Why not just compare percentages of the maximum?

Because those are arbitrary. Standardising by observed spread answers how unusual a value is relative to genuine variation, which is the question decisions usually depend on.

References

  1. [1]National Institute of Standards and Technology (NIST), Engineering Statistics Handbook, Measures of scale and standardised statistics — https://www.itl.nist.gov/div898/handbook/eda/section3/eda35.htm
  2. [2]Wolfram MathWorld, Standardised variable and z-statistic definitions — https://mathworld.wolfram.com/StandardizedScore.html
  3. [3]Penn State Eberly College of Science, STAT 500 Applied Statistics, Normal distributions and standardised scores — https://online.stat.psu.edu/stat500/lesson/2