What a Z-Score Is and Why You Calculate It

A z-score measures how far a single data point sits from the average of your dataset, measured in standard deviations. If your dataset has a mean of 100 and a standard deviation of 15, and you have a data point of 130, the z-score tells you that 130 is exactly 2 standard deviations above the mean. Z-scores let you compare values from different datasets on the same scale, and they show you which values are typical and which are outliers.

You calculate a z-score using one formula, and the result is always a number without units. A z-score of 0 means the value equals the mean. A positive z-score means the value is above the mean. A negative z-score means the value is below the mean. Most data points in a normal distribution fall between −3 and +3.

Key Takeaways

  • The z-score formula is (X − mean) ÷ standard deviation, where X is the data point you are measuring.
  • You need three numbers to calculate a z-score: the individual data point, the mean of the entire dataset, and the standard deviation.
  • A z-score of 2 means the data point is 2 standard deviations above the mean; a z-score of −1.5 means it is 1.5 standard deviations below the mean.
  • Z-scores are useful for spotting outliers and for comparing values measured in different units or on different scales.

The Three Numbers You Need Before You Start

Before you can calculate a z-score, you must have the mean and standard deviation of your dataset. The mean is the average — add all values and divide by how many values you have. The standard deviation measures how spread out the data is; values close to the mean have a small standard deviation, and values scattered far apart have a large one.

Most calculators and spreadsheet programs (Excel, Google Sheets) can compute both the mean and standard deviation for you. In Excel, use =AVERAGE(range) for the mean and =STDEV(range) for the standard deviation. In Google Sheets, the functions are the same. If you are calculating by hand, add all values, divide by the count for the mean, then subtract the mean from each value, square each difference, average those squares, and take the square root — that is the standard deviation.

Once you have the mean and standard deviation, write them down clearly. You will also need the single data point (the X value) you want to convert to a z-score.

The Z-Score Formula and Step-by-Step Calculation

The z-score formula is:

z = (X − mean) ÷ standard deviation

Here is how to work through it step by step. Suppose your dataset has a mean of 50, a standard deviation of 10, and you want the z-score for the data point 65.

Step 1: Subtract the mean from your data point. 65 − 50 = 15.

Step 2: Divide the result by the standard deviation. 15 ÷ 10 = 1.5.

Your z-score is 1.5. This means the data point 65 is 1.5 standard deviations above the mean of 50.

If your data point is below the mean, the result will be negative. For example, if your data point is 35, then 35 − 50 = −15, and −15 ÷ 10 = −1.5. A z-score of −1.5 means the value is 1.5 standard deviations below the mean.

Working Through a Real Example

Imagine you have test scores from a class: 72, 85, 78, 92, 88, 76, 81, 95, 79, 87. You want to know the z-score for the student who scored 92.

First, calculate the mean: (72 + 85 + 78 + 92 + 88 + 76 + 81 + 95 + 79 + 87) ÷ 10 = 833 ÷ 10 = 83.3.

Next, calculate the standard deviation. Subtract the mean from each score, square the result, add all the squares, divide by the number of values, and take the square root. The squared differences are: 127.69, 2.89, 28.09, 75.69, 22.09, 53.29, 5.29, 139.69, 18.49, 13.69. Their sum is 487.1. Divide by 10 to get 48.71. The square root of 48.71 is about 6.98. So the standard deviation is 6.98.

Now explore the formula: z = (92 − 83.3) ÷ 6.98 = 8.7 ÷ 6.98 = 1.25. The score of 92 is 1.25 standard deviations above the class mean, which is a strong performance but not an extreme outlier.

Using a Spreadsheet to Calculate Z-Scores Faster

If you have many data points, a spreadsheet is faster and less error-prone than hand calculation. In Excel or Google Sheets, enter your data in one column. In a new column, use the formula =(A1−AVERAGE($A$1:$A$100))/STDEV($A$1:$A$100), replacing A1 with the cell of the data point you want to convert and replacing the range $A$1:$A$100 with your actual data range. The dollar signs lock the range so it does not change when you copy the formula down.

Copy this formula down for every row, and each cell will show the z-score for that data point. This method eliminates arithmetic errors and takes seconds instead of minutes.

What Z-Scores Tell You About Your Data

Z-scores help you identify outliers and understand where a value sits relative to the rest of the dataset. A z-score between −2 and +2 is considered typical in most datasets. A z-score above +3 or below −3 is usually an outlier — a value so far from the mean that it warrants investigation.

Z-scores also let you compare values from different datasets. If one student scored 92 on a test with a mean of 83 and standard deviation of 7, and another student scored 88 on a different test with a mean of 75 and standard deviation of 8, you cannot tell who performed better by looking at raw scores alone. But the first student has a z-score of (92 − 83) ÷ 7 = 1.29, and the second has a z-score of (88 − 75) ÷ 8 = 1.625. The second student performed slightly better relative to their class, even though the raw score is lower.

Common Mistakes to Avoid

The most common error is using the wrong standard deviation. Excel and Google Sheets have two functions: STDEV (or STDEV.S) calculates the sample standard deviation, and STDEVP (or STDEV.P) calculates the population standard deviation. Use STDEV if your data is a sample from a larger group. Use STDEVP only if your data represents the entire population. Most of the time, you are working with a sample, so STDEV is correct.

Another mistake is forgetting to subtract the mean before dividing by the standard deviation. The order matters: subtract first, then divide. Reversing the steps gives you a meaningless number.

A third error is misinterpreting the sign. A negative z-score does not mean something is wrong — it straightforward means the value is below the mean. A z-score of −1 is just as valid as +1; it is in the opposite direction.

Frequently Asked Questions

What does a z-score of 0 mean?

A z-score of 0 means the data point equals the mean exactly. It is right at the center of your dataset, neither above nor below average.

Can a z-score be larger than 3?

Yes. Z-scores can be any number, positive or negative. A z-score larger than 3 or smaller than −3 is rare in a normal distribution and usually signals an outlier worth examining.

Do I need to calculate the mean and standard deviation myself?

No. Any spreadsheet program or scientific calculator can compute both in seconds. Hand calculation is useful for understanding how they work, but for actual data analysis, use a tool.

What is the difference between a z-score and a percentile?

A z-score tells you how many standard deviations a value is from the mean. A percentile tells you what percentage of the dataset falls below that value. They measure different things, though you can convert one to the other using a z-score table.

Why would I use a z-score instead of just looking at the raw number?

Z-scores let you compare values on the same scale, even if they come from different datasets or have different units. They also make it straightforward to spot outliers and understand whether a value is typical or unusual.