Z score calculator
You have a single data point — a test score, a height, a lab result — and you want to know how far it sits from the average.
- Step-by-step explanation of the math
- Worked examples included
- Faster than a spreadsheet
Z score calculator
Enter your numbers and press Calculate
How to use the z score calculator
You only need three numbers, the same ones that appear in any statistics problem:
1. Value (x): the raw data point you want to standardize, for example a student's test score, a height in centimeters or a cholesterol reading from a lab. 2. Mean (μ): the average of the set or population you are comparing against. If you are working with the standard normal distribution, the mean is 0. 3. Standard deviation (σ): how spread out the data is around the mean. In the standard normal it equals 1. It must be a positive number.
Click Calculate and you get five results at once:
- Z score: how many standard deviations your value sits from the mean. Positive if x is above μ, negative if below.
- Approximate percentile: the percentage of the population that falls below your value. A z of 1 corresponds to roughly the 84th percentile.
- P(Z<z): the left-tail probability, that is, the chance of getting a value lower than yours.
- P(Z>z): the right-tail probability, the chance of getting a value higher than yours.
- Two-tailed probability: the chance of landing that far from the mean or farther, in either direction. This is the two-sided p-value used in many hypothesis tests.
One important detail about the sign: the z score keeps its direction. If your value is below the mean, you get a negative z and a low percentile, which is correct and expected. If you enter a standard deviation of 0, the tool returns a z score of 0 to avoid a division by zero, since with no spread standardizing makes no sense.
Z score formula with a worked example
The z score comes from a very simple formula. In plain text:
- z = (x − μ) / σ
where x is the raw value, μ is the mean and σ is the standard deviation. The result is read as the number of standard deviations between your data point and the mean.
Worked example, step by step. A student scores 80 on an exam whose class mean is 70 with a standard deviation of 10 (x = 80, μ = 70, σ = 10):
1. Subtract the mean: 80 − 70 = 10. 2. Divide by the standard deviation: 10 / 10 = 1.00. That is the z score: the student is one standard deviation above the mean. 3. Percentile: a z of 1 leaves roughly 84.13% of the class below, that is, the 84th percentile. 4. Tails: P(Z<1) ≈ 0.8413 and P(Z>1) ≈ 0.1587; the two-tailed probability is 2 × 0.1587 ≈ 0.3173.
From z to percentile. Turning a z score into a percentile means computing the area under the standard normal curve to the left of z, known as the cumulative distribution function (CDF). This calculator estimates it with the Zelen and Severo rational approximation from the Abramowitz and Stegun handbook (formula 26.2.17). It first defines t = 1 / (1 + 0.2316419 × |z|) and the density φ(z) = (1 / √(2π)) × e^(−z²/2); then the upper tail is approximated as φ(z) × (0.319381530·t − 0.356563782·t² + 1.781477937·t³ − 1.821255978·t⁴ + 1.330274429·t⁵). The area to the left is 1 minus that tail for positive z, or the tail itself for negative z. The maximum error of this approximation is below 7.5 × 10⁻⁸, more than enough for any academic or professional use, and everything is computed with elementary operations and a single exponential, with no tables or special functions.
Common mistakes when calculating a z score
The z score formula is short, but there are several common slip-ups worth avoiding:
- Confusing standard deviation with variance. The variance is σ², the standard deviation is σ. If you have a variance of 25, the standard deviation is √25 = 5, not 25. Plugging the variance straight in inflates the denominator and wrongly shrinks the z.
- Mixing up population and sample σ. To standardize a single data point against a known population you use the population σ. If instead you are standardizing a sample mean in a hypothesis test, the denominator is the standard error σ/√n, not σ. Be clear about which z you are computing.
- Forgetting the sign. A negative z is not an error: it simply means your value is below the mean. The matching percentile will be under 50, which is correct.
- Using a standard deviation of 0 or negative. The standard deviation is always positive. A value of 0 means every data point is identical and standardizing is undefined; this calculator returns z = 0 in that case to avoid dividing by zero.
- Comparing z scores from non-normal distributions. The percentile and probabilities the tool returns assume an approximately normal distribution. If your data is heavily skewed, the z still reports distance from the mean, but the percentile derived from the normal curve may not represent your population well.
A corrected example. Suppose you are given a variance of 16 and a value of 22 against a mean of 14. The typical mistake is to write σ = 16, which would give z = (22 − 14) / 16 = 0.5. The correct step is to use σ = √16 = 4, so that z = (22 − 14) / 4 = 2.00, a score four times larger and with a radically different interpretation (98th percentile instead of 69th).
Real-world z score examples
The z score shows up in many everyday settings. This table collects typical cases solved with the same formula z = (x − μ) / σ:
| Situation | Value (x) | Mean (μ) | SD (σ) | z | Approx. percentile |
|---|---|---|---|---|---|
| Exam above the average | 80 | 70 | 10 | +1.00 | 84 |
| Height below the average | 165 | 175 | 7 | −1.43 | 8 |
| Very high IQ test | 130 | 100 | 15 | +2.00 | 98 |
| Race time (faster = better) | 52 s | 60 s | 5 | −1.60 | 5 |
| Blood glucose reading | 110 | 90 | 12 | +1.67 | 95 |
How to read the table. On the exam, a z of +1.00 places the student at the 84th percentile: they outperform 84% of the class. For height, a z of −1.43 corresponds to a person shorter than average, around the 8th percentile. The IQ test of 130 gives z = +2.00, the classic 98th percentile of aptitude tests. For the race, mind the context: a lower time is better, so even though the z is negative, that runner is among the fastest. And a glucose reading with z = +1.67 (95th percentile) is a sign the value sits well outside the usual range.
The key is that the z score makes very different quantities — seconds, centimeters, test points — directly comparable by expressing them all in the same unit: standard deviations from their own mean. That is why it underlies standardized scales, normalized grades and countless quality-control checks.
About this calculator
The z score (or z value) answers exactly that: it tells you how many standard deviations your value lies above or below the mean. Enter the raw value (x), the mean (μ) and the standard deviation (σ), and this calculator instantly returns the z score plus the approximate percentile and the three key probabilities of the normal distribution: the left tail P(Z<z), the right tail P(Z>z) and the two-tailed probability. A z of 0 means you are exactly at the mean; a z of +2 means your value beats roughly 97.7% of the population. The percentile and probabilities are computed with the Zelen and Severo rational approximation (Abramowitz and Stegun, formula 26.2.17), so you get a reliable estimate of the standard normal distribution without consulting tables or handling special functions.
Frequently asked questions
What is a z score and what is it used for?
A z score tells you how many standard deviations a value is above or below the mean. It is used to compare data from different distributions, spot outliers and turn a value into its percentile within a normal distribution. For example, a z of +2 means the value is two standard deviations above the mean, around the 98th percentile.
How do I calculate a z score step by step?
Subtract the mean from the value and divide the result by the standard deviation: z = (x − μ) / σ. For example, with x = 80, μ = 70 and σ = 10, first 80 − 70 = 10 and then 10 / 10 = 1. The z score is 1, which means the value is one standard deviation above the mean. In this calculator you just enter those three numbers and click Calculate.
How do I convert a z score to a percentile?
The percentile is the area under the standard normal curve to the left of the z score, expressed as a percentage. It was traditionally looked up in a z table; this calculator estimates it with the Zelen and Severo rational approximation (Abramowitz and Stegun 26.2.17). For example, z = 0 gives the 50th percentile, z = 1 gives roughly the 84th and z = −1 the 16th.
How accurate is the percentile the calculator returns?
The Zelen and Severo approximation this tool uses has a maximum error below 7.5 × 10⁻⁸ across the entire standard normal curve, so the percentile matches statistical tables to several decimal places. That is more than enough for coursework, reports and hypothesis tests. Only if you need extreme precision in the very far tails (z above 6 or 7) would specialized methods be worth using.