Math Tools

Z-score explained: compare anything on one scale and spot outliers

A score of 78 in maths and 70 in science: which is the better result? A z-score answers that by counting how many standard deviations a value sits from the average. This guide covers the formula, the percentile table, the 68-95-99.7 rule, and how rare 3, 4 and 5 sigma events really are.

By the Toolcloak team9 October 20264 min read
In this article
  1. The formula in plain words
  2. The z-to-percentile table
  3. The 68-95-99.7 rule
  4. Comparing two different tests fairly
  5. How rare is rare?
  6. Finding outliers with z-scores
  7. Z-scores for sample means
  8. When z-scores mislead

Raw numbers hide their context. Is 78 good? It depends on how the rest of the class did. A z-score (also called a standard score) removes the units and the scale: it says how many standard deviations a value lies above or below the mean. Once everything is in z-scores, you can compare marks, heights, speeds or prices on one common ruler.

The formula in plain words

Take the value, subtract the average, and divide by the typical spread. The subtraction tells you how far from average you are. The division tells you how big that distance is compared with normal variation.

Example: a student scores 78, class mean 62, standard deviation 8
  1. 1Distance from the mean78 − 62 = **16** marks above average.
  2. 2Divide by the standard deviation16 ÷ 8 = **2.0**.
  3. 3Read the resultThe score is 2 standard deviations above the mean, around the 97.7th percentile if marks are bell-shaped.

Going the other way is just as easy: value = mean + z × standard deviation. A z of −1.5 here would be 62 − 1.5 × 8 = 50.

Enter a value, the mean and the standard deviation to get the z-score and its percentile.Open Z-Score Calculator

The z-to-percentile table

For bell-shaped data, each z-score maps to a share of the group that scores lower. The mapping comes from the normal distribution, so a calculator or table gives it instantly.

z-scorePercentile (below)Share within ±z of the mean
050.00%0%
0.569.15%38.29%
1.084.13%68.27%
1.593.32%86.64%
1.9697.50%95.00%
2.097.72%95.45%
2.599.38%98.76%
3.099.87%99.73%

The row for 1.96 is the famous one: it marks off the middle 95%, which is why 1.96 appears in so many confidence intervals.

How to read a z-score
Very low
Below avg
Above avg
Very high
z = 2
-3-2-10123

Beyond ±2 you are in the outer 5% of a bell curve. Beyond ±3 you are in the outer 0.3%.

The 68-95-99.7 rule

Because the bell curve is symmetrical, the share of values in each band is fixed. This is the quick mental version of the table above.

Share of values in each z-score band (%)
2.1%−3 to −213.6%−2 to −134.1%−1 to 034.1%0 to 113.6%1 to 22.1%2 to 3

The extra 0.13% beyond −3 and 0.13% beyond +3 are not shown. Adding all eight pieces gives 100%.

Inside versus outside
68.3%Within ±1 SDAbout 2 in 3
95.4%Within ±2 SDAbout 19 in 20
99.7%Within ±3 SDAbout 997 in 1,000
0.27%Beyond ±3 SDAbout 1 in 370

These are for an exactly normal distribution. Real data is only roughly bell-shaped, so treat them as a guide.

Comparing two different tests fairly

This is the classic use. Maria scored 78 in maths and 70 in science. The maths mean was 65 with a standard deviation of 8. The science mean was 55 with a standard deviation of 6.

SubjectScoreMeanSDz-scorePercentile
Maths786581.6394.8%
Science705562.5099.4%

The science mark is lower in raw terms, but much further above its class average.

Maria's two subjects, by z-score
Maths (78)
1.63
Science (70)
2.50

Her science result is the stronger one, even though 78 looks bigger than 70.

How rare is rare?

Outside a given number of standard deviations, the share of a normal distribution gets tiny very quickly. This table counts both tails together.

Distance from meanShare outsideAbout 1 in
±1 SD31.73%3
±2 SD4.55%22
±3 SD0.27%370
±4 SD0.0063%15,787
±5 SD0.000057%1.74 million

Physicists quote 'five sigma' for discoveries, but they use one tail only, which is about 1 in 3.5 million.

Out of 1,000,000 values in a normal distribution
  1. 682,689
    Within ±1 SD
  2. 954,500
    Within ±2 SD
  3. 997,300
    Within ±3 SD
  4. 999,937
    Within ±4 SD

Each wider band adds fewer and fewer extra values. That is why a 4 sigma result is a strong signal that something unusual happened.

Finding outliers with z-scores

A common rule flags values with z above 3 or below −3. Some analysts use 2.5, or 2 for small sets. It is a screen, not a verdict: an outlier might be a typing mistake, a faulty sensor, or a genuine rare event worth keeping.

  1. Compute the mean and standard deviation of the whole set.
  2. Calculate a z-score for each value.
  3. Flag the ones beyond your cut-off (3 is common).
  4. Look at each flagged value. Check the source before deleting anything.
  5. Recalculate if you remove a value, because the mean and standard deviation will change.

Z-scores for sample means

When you test an average rather than a single value, divide by the standard error, σ ÷ √n, instead of σ. Example: a population has mean 70 and standard deviation 10. A sample of 36 people averages 73. The standard error is 10 ÷ 6 = 1.67, so z = (73 − 70) ÷ 1.67 = 1.8.

Same data, two different questions
One person scores 73z = 0.3
  • Divide by the standard deviation, 10
  • (73 − 70) ÷ 10 = 0.3
  • Perfectly ordinary
A group of 36 averages 73z = 1.8
  • Divide by the standard error, 1.67
  • (73 − 70) ÷ 1.67 = 1.8
  • Only about 3.6% of group averages would be this high

Averages vary far less than individuals, so the same gap counts for much more.

When z-scores mislead

  • Skewed data. Incomes, house prices and website visits have long right tails. Percentiles from the normal table will be off.
  • Tiny samples. With fewer than about 30 values, the standard deviation itself is uncertain. A t-score is more honest.
  • Mixed groups. If you blend two different populations, the single mean and spread describe neither.
  • Ordinal scales. Ratings from 1 to 5 are not truly continuous, so z-scores are only a rough guide.

Questions people ask

What is a z-score?

A z-score is the number of standard deviations a value lies from the mean. It is calculated as (value − mean) ÷ standard deviation.

What is a good z-score?

It depends on the context. A z-score above 0 is above average. Above 2 puts a value in roughly the top 2.3% of a normal distribution, and below −2 in the bottom 2.3%.

Can a z-score be negative?

Yes. A negative z-score means the value is below the mean. For example, z = −1 is one standard deviation below average.

How do I convert a z-score to a percentile?

Use a standard normal table or calculator. For instance, z = 1 is about the 84th percentile, z = 1.96 is the 97.5th and z = 3 is the 99.87th.

What z-score counts as an outlier?

Many analysts flag values beyond ±3. Others use ±2.5 or ±2, especially for small data sets. Always inspect flagged values before removing them.

Is a z-score the same as a t-score?

No. A z-score uses the known population standard deviation. A t-score uses the sample's own estimate and is wider for small samples.