Compute the z-score (standard score) of a raw value given its distribution’s mean and standard deviation. Optionally show the corresponding percentile under the normal-distribution assumption via the cumulative distribution function of the standard normal.
The formula
z = (x − μ) / σ
where x is the raw value, μ is the mean of the distribution, and σ is the standard deviation. The result is a dimensionless number: positive for values above the mean, negative for below, with magnitude measured in standard-deviation units.
Example: IQ scores
IQ tests are calibrated to have mean 100 and standard deviation 15. What’s the z-score for an IQ of 130?
z = (130 − 100) / 15 = 2.0
That’s two standard deviations above the mean. Under the normal assumption (which IQ tests are normed against), this corresponds to about the 97.7th percentile — only about 2.3% of people score 130 or above.
Example: converting a raw test score to a percentile
A standardised test has mean 500 and stdev 100. You score 650. z = (650 − 500) / 100 = 1.5. Percentile ≈ 93.3rd — you scored better than about 93% of test-takers.
Example: comparing scales
You got 85 on a quiz (class mean 75, stdev 8) and 30 on a programming challenge (cohort mean 25, stdev 3). Which was the more impressive performance?
- Quiz: z = (85 − 75) / 8 = 1.25
- Challenge: z = (30 − 25) / 3 ≈ 1.67
The challenge score is more impressive — further above the mean in standardised units, even though the raw number is lower. This is exactly what z-scores are for: comparing performance across differently-scaled distributions.
The percentile calculation
Under the assumption that the underlying data is normally distributed, the z-score maps to a percentile via the cumulative distribution function (CDF) of the standard normal distribution:
Φ(z) = (1 + erf(z / √2)) / 2
where erf is the error function. The tool computes erf using the Abramowitz & Stegun approximation 7.1.26, accurate to about 1.5 × 10⁻⁷ across the real line. The percentile is then Φ(z) × 100%.
Common z-score benchmarks
| z | Percentile | Two-sided area |
|---|---|---|
| 0 | 50.0 | 0% |
| ±0.67 | 75 / 25 | 50% |
| ±1 | 84.13 / 15.87 | 68.27% |
| ±1.645 | 95.0 / 5.0 | 90% |
| ±1.96 | 97.5 / 2.5 | 95% |
| ±2 | 97.72 / 2.28 | 95.45% |
| ±2.58 | 99.5 / 0.5 | 99% |
| ±3 | 99.87 / 0.13 | 99.73% |
The “one-sigma, two-sigma, three-sigma” rule of thumb comes from the last column: about 68%, 95%, and 99.7% of normal data falls within 1, 2, 3 standard deviations of the mean. This is a useful mental model for any roughly normal distribution.
Normal vs. real-world distributions
The percentile calculation assumes the data is normally distributed. Many real-world distributions are approximately normal — heights, IQ scores, measurement errors, sums of many small independent effects (central limit theorem). But plenty aren’t:
- Income, wealth, city sizes — follow heavy-tailed distributions (log-normal, power-law). Normal-CDF percentiles at the tail will badly underestimate how extreme outliers are.
- Reaction times, failure times — typically right-skewed (log-normal or gamma).
- Discrete distributions — binomial, Poisson, geometric. For these, use the discrete CDF not the normal approximation.
For any real-world dataset, the percentile from the tool is valid to the extent that your data is normal. Always check — plot a histogram, look at skewness, or apply a Shapiro-Wilk test.
What this tool does not do
It doesn’t compute z-scores for every value in a list. For bulk standardisation of a dataset (producing z-scores for each row), you’d want a spreadsheet or a stats library. This tool is for a single value. If you need the mean and standard deviation of your raw data first, the descriptive statistics calculator computes both.
It doesn’t handle non-normal distributions. The percentile calculation assumes normality. For t-distributions, chi-square, exponential, or any other distribution, you need a dedicated tool or library.
It doesn’t do hypothesis tests. “Is this z-score statistically significant?” is a separate question with answer depending on one-vs-two-tailed, significance level, etc. Use a hypothesis-test calculator.
It doesn’t work backwards — given a percentile, find the z-score. That’s the inverse CDF (the probit function), which is a different numerical problem. For that, use a percentile-to-z tool or a stats library.
It doesn’t support small-sample t-scores. For sample sizes below about 30, Student’s t-distribution is often preferred over the normal. The tool uses the normal unconditionally; for small samples, the result is approximate.