Free tool Z-score calculator and z-score formula
A z-score says how many standard deviations a value sits from the mean. Enter a value, the mean and the standard deviation to get z, the percentile and the tail probabilities with the normal curve drawn; go the other way from a percentile to a value; or paste a whole column to see every value’s z-score and which ones are outliers.
- z, percentile and p-values
- Normal curve drawn
- Runs locally
Pick what you have
Results update as you type.
The number you want to place. For a z test, the sample mean.
For example 95 or 97.5.
Population mean, or the mean of your reference data.
Must be greater than 0.
Leave empty for a single value. Fill in to test a sample mean: z = (x̄ − μ) ÷ (σ ÷ √n).
Separate values with spaces, line breaks, tabs or commas. No thousands separators.
Sample (n − 1) for most data; population (n) only if the list is the whole group.
Results
412 is 2.00 standard deviations above the mean: higher than 97.72% of values in a normal distribution.
Z-score
2.000
Percentile
97.72%
Share of a normal distribution below z: Φ(z).
P(Z < z)
0.9772
Left-tailed p.
P(Z > z)
0.0228
Right-tailed p.
P(|Z| > |z|)
0.0455
Two-tailed p.
Within ±2.00 SD
95.45%
Share between −|z| and +|z|.
1 in …
22
About this many values per one at least this far from the mean, either side.
Standard normal curve
The shaded area is the probability your result refers to.
Calculation, step by step
The formulas with your numbers.
| Step | Calculation |
|---|---|
| Z-score | z = (x − μ) ÷ σ = (412 − 340) ÷ 36 = 2 |
| Left tail (percentile) | P(Z < z) = Φ(2) = 0.97725 |
| Right tail | P(Z > z) = 1 − Φ(z) = 0.0227501 |
| Two tails | P(|Z| > |z|) = 2 × 0.0227501 = 0.0455003 |
Z-score of every value
Normal percentile is Φ(z): where the value would sit if the data were bell-shaped. Modified z uses the median and MAD, which one extreme value cannot distort.
Share these inputs: the values go after the # in the link, so they never reach a server.
https://tapcub.com/tools/z-score-calculator
Version v1.0Updated Update history
What a z-score of 2 means
The default example: 412 sign-ups today, against a typical day of 340 with a standard deviation of 36.
The z-score
z = (412 − 340) ÷ 36 = 2.00: today is two standard deviations above an average day. The sign tells the direction; the size tells how unusual. Because z has no units, sign-ups, seconds and dollars become comparable.
Percentile
If daily sign-ups are roughly bell-shaped, Φ(2) = 97.72% of days fall below 412. In other words, only about 2.3% of days would be this high, which is roughly one day in 44.
One- or two-tailed
Asking “is today unusually high?” is one-tailed: p = 0.0228. Asking “is today unusual in either direction?” doubles it: p = 0.0455, about 1 day in 22. Decide which question you are asking before you look.
When the percentile is not trustworthy
The percentile assumes a normal distribution. Revenue, session length and order size are usually right-skewed, so a z of 2 there is less rare than 97.7% suggests. For skewed data, use the percentile from your own data instead.
Use the reverse mode for planning: the 95th percentile of a normal day is 340 + 1.645 × 36 = 399 sign-ups, a reasonable line above which to look for a cause.
Three ways in
Choose the mode that matches what you know.
-
1
Value to z-score
Enter x, the mean and the standard deviation. Add n only if x is a sample mean and you want a z test; the calculator then divides σ by √n.
-
2
Percentile to value
Enter a percentage and say whether it is the share below, above or in the middle. You get the z-score, and with a mean and SD, the value in the original units.
-
3
A whole list
Paste a column of numbers. Each value gets a z-score and a modified z-score; values beyond your threshold are flagged. Choose sample or population SD to match how the data were collected.
Distance from the mean, in standard deviations
The z-score subtracts the mean and divides by the standard deviation. Positive means above the mean, negative below. For a sample mean, divide by the standard error σ ÷ √n instead; that z is the statistic of a one-sample z test. Percentiles and p-values come from the standard normal distribution Φ.
- Population: z = (x − μ) ÷ σ. Sample: z = (x − x̄) ÷ s
- Sample mean (z test): z = (x̄ − μ) ÷ (σ ÷ √n)
- Back to the value: x = μ + z × σ
- Common values: z = 1.645 → 95th percentile; 1.96 → 97.5th (95% two-sided); 2.576 → 99.5th (99% two-sided)
- With the sample SD, |z| can never exceed (n − 1) ÷ √n, so with 10 or fewer values no point reaches |z| > 3 (Shiffler, 1988)
- Modified z-score: M = 0.6745 × (x − median) ÷ MAD; Iglewicz and Hoaglin suggest |M| > 3.5 as a potential outlier (NIST e-Handbook 1.3.5.17)
Z-score
z = (x − μ) ÷ σ
(412 − 340) ÷ 36 = 2.00 → Φ(2) = 97.72%
Z statistic of a sample mean
z = (x̄ − μ) ÷ (σ ÷ √n)
x̄ = 103, μ = 100, σ = 15, n = 36: SE = 2.5, z = 1.2
Percentile to value
x = μ + Φ⁻¹(p) × σ
95th percentile: 340 + 1.645 × 36 = 399.2
Finding the outlier in two weeks of sign-ups
The default list: 14 days of sign-ups, one of which had a burst of 609. Mean 341, sample SD 78.24.
| Day | Sign-ups | z = (x − 341) ÷ 78.24 | Modified z |
|---|---|---|---|
| 1 | 312 | −0.371 | −0.645 |
| 2 | 298 | −0.550 | −1.466 |
| 4 | 341 | 0.000 | 1.056 |
| 9 | 609 | 3.426 | 16.775 |
| 13 | 336 | −0.064 | 0.762 |
Day 9 passes |z| > 3, but only just: the burst itself inflates the SD to 78 (without it the SD is about 14), and with 14 values no z can exceed 13 ÷ √14 = 3.47. The modified z (median 323, MAD 11.5) puts it at 16.8, far beyond 3.5. Example data.
How z-scores get misused
The formula is one line; the assumptions behind the percentile are where things go wrong.
Reading percentiles off skewed data
Φ(z) assumes a bell curve. For order values or session length, a z of 2 may be the 90th percentile, not the 97.7th. Check the shape first.
Letting the outlier hide itself
One extreme value inflates the standard deviation it is measured against (masking). The same burst that should stand out drags its own z down; the modified z does not have this problem.
Using |z| > 3 on a handful of values
With the sample SD, |z| cannot exceed (n − 1) ÷ √n: 2.85 for n = 10. On small lists the rule can never fire; the calculator tells you when that happens.
Mixing up σ and σ ÷ √n
To place one value, divide by σ. To test whether a sample mean differs from μ, divide by the standard error σ ÷ √n. Using σ for a mean understates the evidence by a factor of √n.
Unusual days found for you
A z-score on a spreadsheet tells you about yesterday. TapCub watches the metrics and tells you when one moves.
Anomaly alerts
Rules for drops, spikes, thresholds or an anomaly against the seasonal baseline, sent to email, WeCom, DingTalk, Feishu or a webhook.
Learn moreDistributions and percentiles
Any numeric property or event count as a distribution, with percentiles rather than just averages.
Learn moreBots counted separately
Crawler bursts are a common source of “outlier” days. TapCub keeps bot traffic out of your reports.
Learn moreZ-score questions
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
What is the z-score formula, and how do you calculate it?
z = (x − μ) ÷ σ: subtract the mean from the value and divide by the standard deviation. A value of 412 with a mean of 340 and SD of 36 has z = (412 − 340) ÷ 36 = 2. With sample data, use the sample mean and sample SD.
What does a z-score tell you?
How far a value is from the mean, in standard deviations, and in which direction. z = 0 is the mean, z = 1 is one SD above, z = −2 is two SDs below. For bell-shaped data, about 68% of values are within ±1, 95% within ±1.96 and 99.7% within ±3.
How do I convert a z-score to a percentile?
Use the standard normal cumulative distribution Φ(z): z = 1 is the 84.13th percentile, 1.645 the 95th, 1.96 the 97.5th, 2 the 97.72nd. The calculator shows it directly; in Excel use =NORM.S.DIST(z, TRUE). The reverse mode gives z for a percentile, like =NORM.S.INV(p).
Should I use the sample or population standard deviation?
Sample (dividing by n − 1) whenever the data are a sample of something larger: a few weeks of traffic, survey answers, a test group. Population only when the list is the entire group. For large n the difference is negligible.
Is |z| > 3 a reliable outlier rule?
It is a reasonable first screen for roughly normal data with plenty of values, but it has two blind spots: an extreme value inflates the SD and can hide itself, and on small lists |z| can never reach 3. The modified z-score, based on the median and MAD, avoids both; Iglewicz and Hoaglin suggest |M| > 3.5.
What is the difference between a z-score and a z-test statistic?
Both are (estimate − reference) ÷ spread. A z-score places one value using σ. A z test places a sample mean using the standard error σ ÷ √n. Fill in n to get the test statistic; the two-tailed p is the test’s p-value when σ is known.
How do I calculate z-scores in Excel or Google Sheets?
=STANDARDIZE(x, mean, sd) or simply =(x − AVERAGE(range)) / STDEV.S(range). =NORM.S.DIST(z, TRUE) gives the percentile and =NORM.S.INV(p) goes back from a probability to z. Both functions exist in Excel and Google Sheets.
How are z-scores related to T-scores and other standard scores?
Z-scores have negatives and decimals, so reports often rescale them linearly. A T-score is 50 + 10z: the mean becomes 50 and one SD above becomes 60. IQ-style scales use 100 + 15z. The ranking is the same; only the units change.
Update history
New features, fixes and data refreshes for this tool, newest first.
-
· v1.0
LaunchedFirst release.
Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates
From one value to a relationship
Once you know how unusual a value is, the next questions are how spread out the data are and whether two metrics move together.