Z Value Formula: How to Calculate It
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator works out the z-value (z-score) for a single data point: you enter the raw score, the population mean, and the population standard deviation, and it returns the z-score plus the corresponding probability (area under the normal curve). The z-value formula is z = (x – μ) / σ, where x is the raw score, μ is the mean, and σ is the standard deviation.
Formula
The z-score formula is:
z = (x – μ) / σ
- x – the raw score you are standardizing (same unit as μ and σ).
- μ – the population mean (average) of the distribution.
- σ – the population standard deviation (spread) of the distribution.
The z-score tells you how many standard deviations the raw score is above or below the mean. A positive z means the score is above the mean; a negative z means below. The probability output uses the standard normal cumulative distribution function (erf is the error function) to give the area under the curve to the left of that z-value.
Worked Example
Using the default values from the calculator: raw score x = 85, mean μ = 70, standard deviation σ = 10.
- Subtract the mean from the raw score: 85 – 70 = 15.
- Divide by the standard deviation: 15 ÷ 10 = 1.5.
- So z = 1.5.
The probability (area to the left of z = 1.5) is approximately 0.9332, meaning about 93.3% of the data falls below a score of 85 in this distribution. The calculator rounds the z-score to 2 decimals and the probability to 4 decimals, matching this result.
When to Use the Z-Value
Use the z-score when you have a single observation and you know the population mean and standard deviation. Common situations include:
- Comparing test scores from different distributions (e.g., SAT vs. ACT).
- Identifying outliers in a dataset – a common rule of thumb is that a z-score beyond ±3 is considered unusual.
- Calculating percentiles for normally distributed data.
- Standardizing variables before applying machine learning algorithms.
The z-score assumes the underlying distribution is normal (or at least approximately normal). For small samples or unknown population parameters, you would use the t-statistic instead.
How to Read the Result
The z-score itself is a unitless number. A z of 0 means the score equals the mean. A z of 1.5 means the score is 1.5 standard deviations above the mean. The probability output is the cumulative probability – the chance that a randomly selected value from the population is less than or equal to your raw score. For example, a probability of 0.9332 means 93.32% of values are below 85.
If you need the area to the right (the probability of a value higher than the raw score), subtract the left-tail probability from 1. For two-tailed questions (e.g., “what is the probability of being this far from the mean in either direction?”), you would double the smaller tail.
Common Mistakes
- Using sample standard deviation instead of population σ. The formula requires the population standard deviation. If you only have a sample, use the sample standard deviation (s) but be aware that the result is a t-score, not a z-score, for small samples.
- Mixing units. All three values (x, μ, σ) must be in the same units. If your data is in centimeters and you enter the mean in meters, the z-score will be wrong.
- Forgetting to subtract before dividing. The order of operations matters: always do (x – μ) first, then divide by σ.
- Misinterpreting a negative z. A negative z is not an error; it simply means the raw score is below the mean.
Limits of the Formula
The z-score formula is mathematically exact, but its interpretation depends on the normal distribution assumption. If the data is heavily skewed or has outliers, the z-score can be misleading. Also, the formula only works for a single observation; for sample means, you would use the standard error (σ/√n) in the denominator instead.
Another limitation: the z-score does not tell you anything about the shape of the distribution. Two datasets with the same z-score can have very different probabilities if they are not normal. Always check normality before using z-scores for probability calculations.
Frequently Asked Questions
What is the difference between z-score and t-score?
The z-score uses the population standard deviation (σ) and is used when σ is known. The t-score uses the sample standard deviation (s) and is used when σ is unknown, typically with small samples (n < 30). For large samples, the t-distribution approaches the normal, so the two give similar results.
Can a z-score be greater than 3?
Yes, a z-score can be any real number. A z of 4 or 5 is possible, though extremely rare in a normal distribution (the probability of z > 4 is about 0.00003). Such values often indicate an outlier or a data entry error.
How do I find the probability from a z-score?
Use a standard normal table (z-table) or a calculator with the cumulative distribution function. The table gives the area to the left of the z-score. For example, z = 1.5 corresponds to 0.9332. If you need the area to the right, subtract from 1.
What if I don’t know the population standard deviation?
If you don’t know σ but have a sample, use the sample standard deviation (s) and the t-distribution instead. For large samples (n ≥ 30), the t-distribution is nearly identical to the normal, so you can approximate with a z-score using s as an estimate for σ.
Why do some z-scores have negative values?
A negative z-score simply indicates that the raw score is below the mean. For example, if the mean is 70 and the raw score is 55, then z = (55 – 70)/10 = –1.5. The negative sign is meaningful and should not be ignored.