Math Tools Math Tools

How to Calculate a Z-Score

How to Calculate a Z-Score

By Math Tools ·

How to Calculate a Z-Score

You scored 85 on a math test and 78 on a history test. Which was the better performance?

It looks like math, by 7 points. But suppose the math class averaged 70 with scores typically varying by 10 points, while the history class averaged 65 with scores varying by only 8. Then your history score is actually the more impressive result.

The tool that reveals this is the z-score. It converts any value into a common scale: how many standard deviations it sits above or below the average.


A Lower Raw Score Can Be the Better Result

Raw scores only make sense relative to everyone else's scores. A 78 in a class where most people score in the 60s stands out more than an 85 in a class where most score in the 70s. Z-scores strip away the different scales so you can compare fairly.


The Formula

z = (x − μ) / σ
  • x is the value
  • μ is the mean (average)
  • σ is the standard deviation

A z-score of:

  • 0 means exactly average
  • +1 means one standard deviation above average
  • −2 means two standard deviations below average

Calculate instantly with the z-score calculator.


Worked Example: Comparing Two Tests

Test Your score Class mean Standard deviation
Math 85 70 10
History 78 65 8
Math:    z = (85 − 70) / 10 = 1.5
History: z = (78 − 65) / 8  = 1.625

Your history score is 1.625 standard deviations above the mean, slightly more than math's 1.5. Relative to the class, history was your better result.


Turning a Z-Score Into a Percentile

If data follows a normal distribution, a z-score tells you what percentage of values fall below it. Look it up in a z-table or the standard normal table.

Z-score Percent of values below
−2.0 2.3%
−1.0 15.9%
0 50%
+1.0 84.1%
+1.5 93.3%
+1.96 97.5%
+2.0 97.7%

A math z-score of 1.5 means you scored higher than about 93% of the class, assuming scores are roughly normally distributed.


Negative Z-Scores

Negative z-scores are values below the mean. They're not "bad" by definition. For a race time, a negative z-score means you were faster than average.

Example: Commute times average 32 minutes with a standard deviation of 5 minutes. Today's commute took 28 minutes:

z = (28 − 32) / 5 = −0.8

About 21% of commutes are shorter than today's.


Working Backward: From Z-Score to Value

Rearrange the formula to find the value that matches a z-score:

x = μ + z × σ

Example: A scholarship requires scoring in the top 2.5%, which corresponds to z = 1.96. If exam scores average 500 with a standard deviation of 100:

x = 500 + 1.96 × 100 = 696

You'd need about 696 or higher.


Finding Outliers

A common rule of thumb flags values with |z| greater than 3 as potential outliers. In normally distributed data, only about 0.3% of values are that extreme. Quality-control engineers, fraud analysts and scientists use this to spot unusual measurements for investigation.


An Insider Reference: The Altman Z-Score

Z-scores inspired one of the most famous formulas in finance. In 1968, Edward Altman, a finance professor at New York University, published a model to predict whether a company would go bankrupt within two years.

His Altman Z-score combines five financial ratios, such as working capital to total assets and retained earnings to total assets, each multiplied by a weight found through a statistical technique called discriminant analysis. Companies scoring below a certain threshold were flagged as distressed. In his original study of manufacturing firms, the model classified bankrupt and non-bankrupt companies with high accuracy, and versions of it are still used by analysts and lenders.

It's a different calculation from a statistical z-score, but it shares the same goal: turning messy data into one standardized number you can compare.


Two Concepts Worth Knowing

Standardization

Standardization converts values to z-scores, giving a dataset a mean of 0 and a standard deviation of 1. Machine learning models often standardize inputs so that features measured in different units are treated fairly.

Normal Distribution

The normal distribution is the symmetric bell curve. Converting a percentile from a z-score assumes data is approximately normal. For heavily skewed data, percentiles from z-scores can be misleading.


Quick Answer: How Do You Calculate a Z-Score?

Subtract the mean from the value, then divide by the standard deviation: z = (x − μ) / σ. For a test score of 85 with a class mean of 70 and standard deviation of 10, z = (85 − 70) / 10 = 1.5. A z-score of 1.5 means the value is 1.5 standard deviations above average, higher than about 93% of values in a normal distribution.


Try Them Yourself

Find the average and standard deviation of your last 10 grocery bills. Calculate the z-score of the most expensive one. Was it really an outlier, or just a normal big week?