Article — Z-Score Calculator
Z-score calculator: standardize any value with mean and SD
A z-score is the number of standard deviations a value lies from the mean: z = (x − μ) / σ. A z-score of 0 equals the mean, +1 is the 84th percentile, +2 is the 97.7th, and ±3 marks the boundary beyond which fewer than 0.3% of normal observations fall.
The calculator at the top of this page converts any raw value into a z-score and returns the percentile, normal CDF, two-tailed p-value, and an outlier classification. The article below explains where the formula comes from, how to read the result, and where the standard score shows up across statistics, finance, and process control.
What is a z-score?
A z-score, also called a standard score, expresses how far a single observation sits from the mean of its distribution, measured in standard deviations. It strips out the units of the original measurement and places everything on the same scale: the standard normal scale, with a mean of 0 and a standard deviation of 1.
A z-score of 0 means the value is exactly the mean. Positive z-scores sit above the mean, negative scores sit below. Two values from different distributions become directly comparable once they are standardized — that is the whole point of the z-score.
The z-score formula
The z-score formula is one subtraction and one division.
z = (x − μ) / σ (reverse: x = μ + zσ)x = 85, μ = 75, σ = 8 z = 10 / 8 = 1.25z = 1.25 89.4th percentileSubtract the population mean μ from the value x, then divide by the population standard deviation σ. The result has no units, no matter what the original measurement was. A z-score for body temperature in Fahrenheit will read the same as a z-score for the same temperature in Celsius, provided μ and σ are expressed in matching units.
For sample data, swap μ for the sample mean x̄ and σ for the sample standard deviation s. The arithmetic is identical. The only thing that changes is the reference distribution — once you estimate σ from the data, the strict normal approximation gives way to a Student t-distribution, especially at small sample sizes.
From z-score to percentile
The percentile is the fraction of values that fall below a given z-score. Translating between the two requires the standard normal cumulative distribution function (CDF), written Φ(z), which has no closed-form solution and is computed numerically.
This calculator uses the Abramowitz and Stegun approximation, formula 26.2.17 from their 1964 handbook. Maximum absolute error sits below 7.5 × 10⁻⁸. SciPy, R, and most statistics packages use the same Hastings approximation for the standard normal.
The standard normal CDF has no elementary antiderivative. Every modern statistics package — SciPy, R, MATLAB, Excel — computes it through a polynomial approximation, most commonly from Abramowitz and Stegun's 1964 handbook. The original Hastings approximation, published in 1955, predates the digital calculator and was designed to be evaluated on slide rules and mechanical adding machines.
The 68-95-99.7 rule
The 68-95-99.7 rule (also called the empirical rule or the three-sigma rule) sums up the standard normal in three numbers. About 68% of observations land within one standard deviation of the mean, 95% within two, and 99.7% within three. The remaining 0.3% — three out of every thousand observations — fall outside the ±3σ envelope.
- |z| ≤ 1 covers 68.27% of normal observations
- |z| ≤ 2 covers 95.45% (the most-quoted 95% range)
- |z| ≤ 3 covers 99.73% — the classic three-sigma envelope
- |z| ≤ 6 covers 99.9999998% — Six Sigma quality (3.4 defects per million with the 1.5σ shift)
- ±1.96 is the cutoff for a two-tailed 95% confidence interval
- ±2.576 is the cutoff for 99% — used in pharmaceutical and clinical work
Z-score vs. t-score
A z-score assumes the population standard deviation σ is known. A t-score uses the sample standard deviation s as an estimate of σ, which introduces extra uncertainty. Student's t-distribution accounts for that uncertainty by adding heavier tails — meaning critical values stretch further out for the same significance level.
The practical guideline: use a z-score when σ is genuinely known or when the sample is large enough that sample SD reliably approximates σ — usually n ≥ 30. Use t-statistics for small samples with estimated SD. The two converge as degrees of freedom grow; by df = 100 the difference is around 1%.
Where z-scores are used
The z-score shows up in almost every quantitative field, because comparing observations from different scales is a near-universal task.
In education, standardized test scores like the SAT and GRE are z-scores in disguise. In medicine, BMD T-scores for bone density and growth-chart z-scores for pediatric height follow the same template. In finance, the Altman Z-score blends five ratios into a bankruptcy-risk indicator, and the modified z-score is a staple of outlier detection in algorithmic trading.
In manufacturing, Six Sigma uses ±6σ as a quality target. The 3.4 defects-per-million figure assumes a 1.5σ shift in the process mean, a convention introduced by Mikel Harry at Motorola in the 1980s.
Two test scores from different exams are only comparable as z-scores when both exams produce roughly normal distributions. For skewed grading curves, z-scores still rank correctly but the percentile interpretation drifts. Switch to a rank-based percentile or a robust z-score (using the median and MAD) for skewed data.
Outliers and the z-score threshold
A common screening rule treats any observation with |z| greater than 3 as an outlier. Under the standard normal that catches the rarest 0.27% of points. Some quality programs tighten the threshold to ±2.5 (catching 1.24% of points) or relax it to ±3.5 (catching 0.05%).
The cutoff is a convention, not a law. The z-score uses the mean and standard deviation, both of which are pulled toward extreme values. A single very large observation drags the mean and inflates σ, which can mask other outliers. Robust alternatives — the modified z-score using median absolute deviation, or Tukey fences using interquartile range — sidestep that problem.
A z-score outside ±3 is unusual under normality, but it is not automatically an error. Earnings reports beating estimates by six standard deviations have happened. Lab measurements three SD from the expected mean sometimes reveal a real biological signal. Investigate before excluding — outliers carry information.
Common z-score mistakes
A handful of recurring mistakes turn up across student work and applied analysis:
- Assuming normality — the z-score percentile is only accurate if the data is roughly normal. Skewed data needs a different reference distribution
- Using sample SD with z critical values — when σ is estimated, the t-distribution gives the correct critical values, not the standard normal
- Forgetting sign — a percentile of 84% means z = +1, not |z| = 1; the sign carries meaning
- Mixing one-tailed and two-tailed p-values — the two-tailed p-value is twice the one-tailed value for symmetric distributions; using the wrong one halves or doubles your significance level
- Treating z as a probability — z is a position on the standard normal axis; Φ(z) is the probability
- Outlier exclusion without inspection — automated removal of |z| > 3 points can erase the signal you were looking for