Statistics & Probability Percentiles, Z-Scores & Distribution Shape Standard normal distribution (standardisation)

Z-Score Calculator

A z-score says how many standard deviations a value sits above or below the mean. Enter the raw value, the mean and the standard deviation and this calculator returns the z-score, the percentile it corresponds to under a normal distribution, and the one- and two-tailed probabilities you need for a hypothesis test. Set the sample size above 1 and it switches to the sampling distribution of the mean, dividing the standard deviation by the square root of n.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Raw value xThe observation or sample mean you want to standardise.130
MeanThe population mean, or the value claimed by the null hypothesis.100
Standard deviationThe population standard deviation of individual observations, not of the mean.15
Sample size nLeave at 1 to standardise a single observation; set it to the sample size to standardise a sample mean.1

It returns

  • Z-score — Standard deviations from the mean; negative means below the mean.
  • Percentile
  • P(Z < z), the left tail
  • P(Z > z), the right tail
  • Two-tailed probability
  • Standard error used

The formula

z=xμσ
x=μ+zσ

In plain text: z = (x - mu) / sigma; for a sample mean, z = (x-bar - mu) / (sigma / sqrt(n))

  • zStandard score: distance from the mean in standard deviations (dimensionless)
  • xThe raw value being standardised (same as the data)
  • muMean of the distribution (same as the data)
  • sigmaStandard deviation of individual observations (same as the data)
  • nSample size, when standardising a sample mean (count)

Standardising subtracts the mean and divides by the standard deviation, so the result is dimensionless and has mean 0 and standard deviation 1. Converting a z-score to a percentile additionally assumes the underlying distribution is normal.

Updated Category Percentiles, Z-Scores & Distribution Shape Verified against published test cases Reading time 10 min

What a z-score is

A z-score answers one question: how unusual is this value, measured in the natural ruler of its own distribution? Subtract the mean to find out how far the value sits from the centre, then divide by the standard deviation to express that distance in standard deviations rather than in the original units.

The division is what makes the score portable. A student who scores 130 on an IQ test with mean 100 and standard deviation 15 has z = 2. A part measuring 25.4 mm on a line with mean 25.0 mm and standard deviation 0.2 mm also has z = 2. The two situations have nothing in common physically, but both values sit two standard deviations above their means, and under a normal model both are exceeded by about 2.3% of their populations.

Because it is dimensionless, a z-score lets you compare scores from different tests, different instruments and different units. It is also the input to every normal-based probability calculation: once you have z, the normal distribution supplies the tail areas, and the z-test compares that z against a critical value.

One thing a z-score does not do is make your data normal. Standardising shifts and rescales the values but leaves the shape of the distribution exactly as it was. A z-score of 2 on strongly skewed data is still two standard deviations above the mean, but it may correspond to a very different percentile from the 97.7% the normal curve promises.

The formula, and the version for a sample mean

For a single observation, z = (x - mu) / sigma. Two subtractions and a division, but each part is doing specific work.

x - mu centres the value. After this step, a positive result means above average and a negative result means below, and the size is in the data's own units - 30 IQ points, 0.4 mm, $12,000.

Dividing by sigma rescales it. Standard deviations are the natural unit of a distribution's spread, so dividing converts "30 points" into "2 spreads". The resulting set of z-scores always has mean exactly 0 and standard deviation exactly 1, whatever you started with.

When the value you are standardising is a sample mean rather than a single observation, the denominator changes. Sample means vary less than individual observations, because the highs and lows within a sample partly cancel. Their standard deviation, called the standard error, is sigma divided by the square root of n. So the formula becomes z = (x-bar - mu) / (sigma / sqrt(n)).

The square root is the whole story of sample size. Quadrupling n halves the standard error; multiplying n by 100 divides it by 10. That is why a small deviation from the null hypothesis becomes statistically significant with a large enough sample, and why the same deviation is unremarkable in a small one. Set the sample size box on this page to 1 for an individual value and to your actual n for a mean; everything else is unchanged.

This formula uses the population standard deviation sigma. When you must estimate it from the sample - which is the usual case - the statistic follows a t distribution rather than a normal one, and you should use a t-test instead. The difference matters below roughly n = 30 and becomes negligible above it.

Worked example: an IQ of 130, then a class average

IQ tests are scaled to a mean of 100 and a standard deviation of 15.

  1. Centre the value. 130 - 100 = 30 points above the mean.
  2. Rescale. 30 / 15 = z = 2.00. The score is two standard deviations above average.
  3. Convert to a percentile. The standard normal table gives Phi(2.00) = 0.9772, so the score is at the 97.72nd percentile.
  4. Read the tails. The right tail is 1 - 0.9772 = 0.0228, so about 2.3% of people score 130 or higher. The two-tailed probability is 2 x 0.0228 = 0.0455, the chance of being at least 2 standard deviations from the mean in either direction.

Now suppose a class of 9 students has a mean score of 105, and you want to know whether that is surprising if the class were a random draw from the same population.

  1. Compute the standard error. 15 / sqrt(9) = 15 / 3 = 5.
  2. Centre and rescale. (105 - 100) / 5 = z = 1.00.
  3. Read the tail. Phi(1.00) = 0.8413, so the right tail is 0.1587. About 16% of random classes of nine would average 105 or more.

Compare the two calculations. A single individual scoring 105 is only 1/3 of a standard deviation above the mean, at the 63rd percentile - entirely ordinary. A class of nine averaging 105 is a full standard error above, because averaging nine people smooths out the individual variation. The same raw number of 105 is unremarkable as a person and mildly notable as a class mean, and the only difference in the arithmetic is the sqrt(9) in the denominator.

How to read the number

Read the sign first: positive is above the mean, negative below. Then read the magnitude against the normal benchmarks. Under a normal distribution, about 68% of values fall within z = plus or minus 1, about 95% within plus or minus 2, and about 99.7% within plus or minus 3. So a z of 0.5 is thoroughly typical, a z of 2 is in the top or bottom 2.3%, and a z of 3 is roughly a 1-in-741 event on one side.

In hypothesis testing the convention is to compare the absolute z against a critical value. For a two-tailed test at the 5% level, the cut-off is 1.96, and this page's two-tailed probability is the p-value for that test: if it is below your significance level, you reject the null. Note that a two-tailed p-value of 0.0455 at z = 2 is the same information as the 2.3% right tail, doubled to cover both directions.

Three cautions about converting a z-score into a percentile. First, the conversion assumes normality; on skewed data it can be badly wrong in the tails, where errors matter most. Second, a large z-score on a large sample says the difference is unlikely to be chance, not that it is large or important - with n = 10,000 a trivial difference produces a huge z. Third, if sigma was estimated from the same small sample, the normal tail areas understate the true uncertainty and you should be using a t distribution.

To go the other way, from a percentile to a raw score, rearrange to x = mu + z x sigma. The inverse normal calculator supplies the z for a given probability and applies that rearrangement for you.

Z-scores, percentiles and tail probabilities

Standard normal values. The percentile column is Phi(z); the right tail is 1 - Phi(z); the two-tailed column is 2(1 - Phi(|z|)).
zPercentileRight tailTwo-tailedRoughly
-3.000.135%0.998650.002701 in 741 below
-2.002.275%0.977250.045501 in 44 below
-1.0015.866%0.841340.317311 in 6 below
0.0050.000%0.500001.00000the mean
1.0084.134%0.158660.317311 in 6 above
1.64595.000%0.050000.10000one-tailed 5% point
1.9697.500%0.025000.05000two-tailed 5% point
2.0097.725%0.022750.045501 in 44 above
2.57699.500%0.005000.01000two-tailed 1% point
3.0099.865%0.001350.002701 in 741 above

Every figure is the standard normal cumulative function evaluated at that z and rounded. The 1.645, 1.96 and 2.576 rows are the critical values that appear in almost every introductory test.

Mistakes and limitations

  • Using the sample standard deviation as if it were sigma. When sigma is estimated from a small sample, the statistic follows a t distribution with n - 1 degrees of freedom and has heavier tails. Below about n = 30 the normal p-value is too small.
  • Dividing by sigma when you meant the standard error. Standardising a sample mean requires sigma/sqrt(n). Forgetting the square root understates z by a factor of sqrt(n), which on n = 100 is a factor of ten.
  • Reading a percentile off a non-normal distribution. Standardising never changes the shape. On skewed data the z-score is still a valid distance, but the percentile that goes with it is not 97.7% just because z is 2.
  • Confusing a large z with a large effect. The z-score of a mean grows with the square root of the sample size, so significance and importance are different questions. Report the raw difference alongside the z.
  • Mixing up one-tailed and two-tailed probabilities. They differ by a factor of two, which is the difference between p = 0.026 and p = 0.052 at the conventional threshold. Decide the direction of your test before you look at the data.
  • Standardising against the wrong mean. In a hypothesis test, mu is the value the null hypothesis claims, not the mean of your own sample. Using the sample mean gives z = 0 by construction.

Where the z-score leads

The z-score is the hinge between descriptive and inferential statistics. On the descriptive side it needs a mean and a standard deviation, which come from the mean calculator and the standard deviation calculator. On the inferential side it feeds the normal tail areas from the normal distribution calculator and is compared against the cut-offs from the z critical value calculator.

Several familiar scales are z-scores in disguise. T-scores used in psychometrics are 50 + 10z. IQ points are 100 + 15z. The sigma levels of six sigma quality work are z-scores of a specification limit. Standardised residuals in regression are z-scores of the vertical distances from the fitted line. In each case the underlying operation is identical: subtract the centre, divide by the spread.

When you do not want to assume normality, work with the raw data instead. The percentile calculator reads a position straight off your observations without any distributional model, and the interquartile range calculator flags unusual points using quartiles rather than standard deviations. Those are the tools to reach for when the data are visibly skewed, because they answer the same question without importing an assumption that does not hold.

Frequently asked questions

What is a good or bad z-score?

It depends entirely on context, but the normal benchmarks give a scale: about 68% of values lie between -1 and +1, 95% between -2 and +2, and 99.7% between -3 and +3. A z beyond 3 is rare enough to be worth investigating in most settings; in high-volume manufacturing, where millions of parts are made, even z = 4 occurs regularly.

Can a z-score be negative?

Yes, and it simply means the value is below the mean. A z of -1.5 is one and a half standard deviations below average. The sign carries direction and the magnitude carries distance; for a two-tailed probability only the magnitude matters, which is why that output uses the absolute value.

How do I convert a z-score back to a raw score?

Rearrange to x = mu + z x sigma. With a mean of 100 and a standard deviation of 15, a z of 1.5 corresponds to 100 + 1.5 x 15 = 122.5. If you have a percentile rather than a z, the inverse normal calculator gives you the z first.

When do I use n in the denominator?

Only when the value you are standardising is a sample mean. Then the denominator is the standard error sigma/sqrt(n) rather than sigma itself. For a single observation, n is 1 and the two coincide. Using sqrt(n) on an individual value overstates the z-score badly.

Is a z-score the same as a standard deviation?

No. The standard deviation is a property of the whole distribution, measured in the data's units. A z-score is a property of one value, measured in standard deviations, and is dimensionless. You need the standard deviation to compute a z-score, but they answer different questions.

Does standardising make my data normal?

No. Subtracting the mean and dividing by the standard deviation is a linear transformation: it moves and rescales the distribution but leaves its shape untouched. A skewed data set is exactly as skewed after standardising. That is why the percentile output on this page carries a normality caveat.

Should I use a z-test or a t-test?

Use a z-test when the population standard deviation is genuinely known, which is rare outside quality control with a long process history. Otherwise use a t-test, which accounts for the extra uncertainty in estimating sigma from the sample. The two agree closely once n is above about 30.

What does the two-tailed probability mean?

It is the chance of landing at least as far from the mean as your value, in either direction, if the null hypothesis is true. At z = 2 it is 0.0455, made up of 0.02275 in each tail. Use it when a deviation in either direction would interest you, and the one-tailed figure when only one direction would.

References