What a Z-Score Is and Why You Calculate It
A z-score tells you how many standard deviations a single data point sits away from the average of your dataset. If your dataset has an average of 100 and a standard deviation of 15, and you have a data point of 130, the z-score is 2 — meaning that point is 2 standard deviations above the average. Z-scores let you compare values that come from different datasets or scales on the same footing.
You calculate a z-score using the same formula every time: subtract the mean from your data point, then divide by the standard deviation. The result is a single number that tells you where that point sits relative to the rest of the data. Positive z-scores are above the average; negative z-scores are below it; a z-score of zero means the point equals the mean exactly.
Z-scores are useful when you need to spot outliers, compare test scores from different exams, or understand how unusual a particular measurement is. They also form the foundation for many statistical tests and probability calculations.
Key Takeaways
- The z-score formula is (data point − mean) ÷ standard deviation, and it produces a single number that shows how far a value sits from the average in terms of standard deviations.
- You need three pieces of information to calculate a z-score: the individual data point, the mean of the entire dataset, and the standard deviation of that dataset.
- A z-score of 0 means the data point equals the mean; positive scores are above average and negative scores are below average.
- Z-scores between −2 and 2 are typical; values beyond that range often signal outliers or unusual observations worth investigating.
Gathering the Three Numbers You Need
Before you can calculate a z-score, you must have the mean and standard deviation of your dataset. If you are working with a small dataset, you can calculate these by hand. If your data lives in a spreadsheet, most programs have built-in functions that do this work for you.
The mean is the average: add all the values in your dataset and divide by how many values you have. The standard deviation measures how spread out the data is. A small standard deviation means most values cluster near the mean; a large one means they scatter widely. In Excel or Google Sheets, use AVERAGE() to find the mean and STDEV() or STDEV.S() (for a sample) or STDEV.P() (for an entire population) to find the standard deviation.
Once you have the mean and standard deviation, identify the single data point you want to convert to a z-score. Write down all three numbers clearly before you move to the next step.
The Z-Score Formula and Step-by-Step Calculation
The formula is straightforward:
z = (x − μ) ÷ σ
In this formula, x is your data point, μ (mu) is the mean, and σ (sigma) is the standard deviation. Here is how to work through it:
- Subtract the mean from your data point: x − μ
- Divide the result by the standard deviation: (x − μ) ÷ σ
- Write down your answer. This is your z-score.
Let us work through a concrete example. Suppose you have test scores from a class: the mean is 75 and the standard deviation is 8. One student scored 91. The z-score is (91 − 75) ÷ 8 = 16 ÷ 8 = 2. That student's score is 2 standard deviations above the class average.
If another student scored 59, the z-score is (59 − 75) ÷ 8 = −16 ÷ 8 = −2. That score is 2 standard deviations below the average. The negative sign tells you the direction.
Using Spreadsheets to Calculate Z-Scores Quickly
If you have many data points, a spreadsheet is faster and less error-prone than hand calculation. In Excel or Google Sheets, you can create a formula that calculates the z-score for each row.
First, calculate the mean and standard deviation of your dataset in separate cells. Then, in a new column, enter a formula like =(A2−AVERAGE($A$2:$A$100))/STDEV($A$2:$A$100), where A2 is the first data point and the range $A$2:$A$100 covers your entire dataset. The dollar signs lock the range so it does not change when you copy the formula down. Copy this formula to every row, and the spreadsheet will calculate the z-score for each value automatically.
Some spreadsheet programs also have a built-in STANDARDIZE function that does this in one step: =STANDARDIZE(value, mean, standard_deviation). Check your program's documentation to see if this function is available.
Interpreting Z-Scores and What They Tell You
Once you have calculated a z-score, you need to understand what it means. A z-score of 0 means the data point is exactly at the mean. A z-score of 1 means it is one standard deviation above the mean; a z-score of −1 means one standard deviation below.
In a normal distribution, about 68% of all data falls between z-scores of −1 and 1. About 95% falls between −2 and 2. About 99.7% falls between −3 and 3. If your z-score is beyond −3 or 3, the data point is unusual and may be worth investigating as a potential outlier.
Z-scores also let you compare apples to oranges. If one student scored 85 on a test with a mean of 80 and standard deviation of 5 (z-score = 1), and another student scored 92 on a different test with a mean of 88 and standard deviation of 4 (z-score = 1), both students performed equally well relative to their peers, even though their raw scores differ.
Common Mistakes to Avoid
The most frequent error is using the wrong standard deviation. If your data is a sample from a larger population, use the sample standard deviation (often labeled STDEV.S in spreadsheets). If your data represents the entire population you care about, use the population standard deviation (STDEV.P). Using the wrong one will skew your z-score slightly.
Another mistake is forgetting to subtract the mean before dividing by the standard deviation. The order matters: always subtract first, then divide. Reversing the steps will give you a meaningless number.
A third pitfall is misinterpreting the sign. A negative z-score does not mean something is wrong or bad — it straightforward means the value is below the average. Negative z-scores are normal and expected for data points in the lower half of your distribution.
When to Use Z-Scores and When to Use Alternatives
Z-scores work best when your data follows a roughly normal (bell-curve) distribution. If your data is heavily skewed or has extreme outliers, z-scores may not paint an accurate picture. In those cases, you might use percentile ranks or other methods instead.
Z-scores are also most useful when you are comparing individual values to a known mean and standard deviation. If you are trying to compare two entire datasets to each other, or if you need to test whether a difference is statistically significant, you will likely need a different statistical test altogether.
For most everyday uses — spotting unusual values, comparing scores across different scales, or understanding how typical a measurement is — z-scores are the right tool. They are straightforward to calculate, straightforward to interpret, and widely understood.
Frequently Asked Questions
Can a z-score be zero?
Yes. A z-score of zero means your data point equals the mean exactly. This is not unusual — in any dataset, at least one value will be at or very close to the mean.
What does a z-score of 2.5 mean?
A z-score of 2.5 means the data point is 2.5 standard deviations above the mean. In a normal distribution, this is fairly unusual — only about 0.6% of values fall beyond a z-score of 2.5 in either direction.
Do I need to round my z-score?
Rounding depends on your purpose. For most practical uses, rounding to two decimal places is fine. If you are using the z-score in further statistical calculations, keep more decimal places to avoid compounding rounding errors.
What if my standard deviation is zero?
If the standard deviation is zero, all values in your dataset are identical, and the z-score formula breaks down (you cannot divide by zero). This situation is rare in real data and usually signals a data entry error or a dataset too small to be meaningful.
How do I know if my data is normally distributed?
You can create a histogram to visualize the shape, or use a normality test like the Shapiro-Wilk test if your spreadsheet or statistics program supports it. Many real-world datasets are approximately normal, so z-scores often work well even if the distribution is not perfect.