Thirty people, height in centimetres and weight in kilograms, correlated 0.7998. The last row — 162 cm and 82 kg — is 1.3549 standard deviations from the mean at worst on either variable, which no single-variable screen would stop on. Its Mahalanobis d² is 13.5200 against a cutoff of 9.2103, p = 0.0012. Meanwhile row 2, at 184.2 cm and 90.5 kg, is 2.4684 SD out — the largest single-variable deviation here — and its d² is only 6.5046. The two screens rank these points in opposite order, because a short heavy person breaks the height-weight pattern and a tall heavy one follows it.
30 rows · 2 variables · cutoff 9.2103 at 1.0%
1 of 30 rows flagged
1 of them would pass a single-variable screen at 2 standard deviations. That is the whole point of the method: the point is ordinary on every variable taken alone and unusual in the pattern between them.
Flagged
1
of 30 rows
Joint only
1
ordinary on every variable
Largest d²
13.5200
cutoff 9.2103
Condition number
8.99
well conditioned
The distances sum to 58.000000, and with 2 variables and 30 rows they have to sum to exactly 58. That identity holds for any data whatsoever, so it checks the covariance, the inversion and the quadratic form in a single number — and the verification suite asserts it on 120 generated datasets.
Where the flagged points sit
Marked points are the flagged ones. On a correlated pair they are rarely the ones furthest from the centre of the picture — they are the ones furthest from the diagonal band the rest of the data forms.
Ranked by distance
The twelve rows furthest from the centre, with the single-variable comparison
Row
Values
d²
d
p
Largest z
Verdict
30
162.00, 82.00
13.5200
3.6769
0.00116
1.3549
flagged, joint only
2
184.20, 90.50
6.5046
2.5504
0.03868
2.4684
passes, despite z > 2
22
186.40, 81.10
3.5505
1.8843
0.16944
1.8425
ordinary
4
185.20, 83.00
2.9465
1.7165
0.22918
1.7043
ordinary
9
156.50, 59.50
2.8340
1.6835
0.24244
1.6014
ordinary
11
184.20, 79.00
2.7906
1.6705
0.24775
1.5891
ordinary
6
178.90, 71.70
2.6341
1.6230
0.26792
0.9787
ordinary
28
165.80, 61.60
2.4960
1.5799
0.28707
1.3174
ordinary
15
157.80, 60.20
2.4276
1.5581
0.29707
1.5008
ordinary
27
158.10, 65.60
2.3294
1.5262
0.31202
1.4171
ordinary
10
159.00, 60.10
2.3210
1.5235
0.31333
1.5139
ordinary
25
159.00, 62.90
1.7511
1.3233
0.41664
1.3135
ordinary
The last two columns are the argument. A z-score screen sorts by the sixth; this sorts by the third. Where the variables are correlated, the two orderings disagree.
The centre it measures from
The mean of each variable
Variable
Mean
Variable 1
170.4033
Variable 2
71.6567
Both the mean and the covariance are estimated from the same data the outliers are in, so a severe outlier pulls the centre towards itself and shrinks its own distance. With more than one or two suspect points, a robust estimator is the right tool rather than this one.
Uses the correlation structure Σd² checks itself Scale-free Not robust to many outliers
What this tool shows
On the shipped preset the point flagged as an outlier is 1.3549 standard deviations from the mean at worst. The point 2.4684 standard deviations out is not flagged. Height and weight correlate 0.7998 across those thirty people, so 162 cm and 82 kg breaks the pattern while 184.2 cm and 90.5 kg follows it. Checking one variable at a time cannot see the difference, and the two screens end up ranking the same data in opposite order.
Mahalanobis d² for every row, with the chi-square cutoff at your chosen threshold
The largest single-variable z-score beside each distance, so the two screens can be compared directly
A count of the rows that are flagged jointly while looking ordinary on every variable alone
The condition number, which says when the covariance matrix is too close to singular to invert safely
Σd² printed against p(n−1), an identity that must hold exactly for any data at all
Presets where the joint screen wins, where the single-variable screen wins, and where neither finds anything
Uses the correlation Σd² checks itself Scale-free z-scores shown alongside
The mean and covariance come from the same data the outliers are in.
Updated 13 September 2026 · Works in any browser, no installation
Mahalanobis distance measures how far a point is from the centre of a dataset in units of that dataset’s own spread and correlation, rather than in units of each variable separately. A z-score asks how unusual each measurement is on its own. This asks how unusual the combination is. When the variables move together, those are different questions with different answers — and the gap between them is not a rounding difference, it is a reversal.
At a glance
Formula shown
d² = (x − μ)ᵀ S⁻¹ (x − μ), where μ is the vector of means and S the sample covariance matrix. With independent, equally scaled variables S⁻¹ is the identity and d² collapses to the sum of squared z-scores. Everything interesting the measure does comes from the off-diagonal entries of S⁻¹. Under multivariate normality d² follows a chi-square distribution on p degrees of freedom, which is where the cutoff comes from.
Scenario support
Screening multivariate data for entry errors and anomalies, quality control on several correlated dimensions at once, fraud and intrusion detection, checking whether a new observation belongs to a reference population, and computing the leverage of a point before fitting a regression.
Educational estimate
Planning support from the values you enter — not professional advice.
The two screens rank the data in opposite order
This is not a subtle improvement over checking each variable. On the shipped preset the two methods disagree about which point is the most unusual, and they are not close.
Row 30 is 162 cm and 82 kg. It is 1.3549 standard deviations from the mean at worst — comfortably inside any single-variable screen. Its d² is 13.5200 against a cutoff of 9.2103, p = 0.0012.
Row 2 is 184.2 cm and 90.5 kg. It is 2.4684 standard deviations out, the largest single-variable deviation anywhere in the table. Its d² is 6.5046 and it is not flagged.
The reason is a correlation of 0.7998. Tall people tend to weigh more, so a tall heavy person is ordinary. A short heavy person is not, even though neither of their two numbers is remarkable by itself.
Which means a z-score screen on correlated variables is not merely weaker. It answers a different question, and reports the wrong point.
And the converse also happens
The direction people expect is that the joint test finds more. It also finds less, and the second preset is there to show it.
Twenty-six patients, three correlated blood measurements, and one row holds the maximum on all three at once. 172, 112 and 292 — the largest value in every column.
It is not flagged. d² is 5.2600 against a cutoff of 11.3449, p = 0.1537, and it ranks only third by distance.
The row that ranks first is 158, 78, 258, which is 1.4696 standard deviations out at worst — barely anything on its own.
Being high on everything at once is exactly what positively correlated variables do. It is only remarkable if the variables were independent, and here they are not.
A check that holds for every dataset
The distances have a property that makes them unusually easy to verify, and this page prints it rather than keeping it in the test suite.
The distances must sum to exactly p(n − 1) when the sample covariance is used — two variables and thirty rows gives 58, and the page shows 58.000000.
That is true for any data whatsoever, no distributional assumption required. It comes from the trace of a projection and does not care what the numbers are.
It checks three things at once: the covariance matrix, its inverse, and the quadratic form. Break any one and the sum stops matching.
The verification suite asserts it on 120 generated datasets across two to five variables and eight to sixty rows, and separately asserts that rescaling and shifting every column leaves every distance unchanged.
Where the cutoff comes from, and what it assumes
The threshold is a chi-square quantile, and it rests on an assumption worth being explicit about.
Under multivariate normality, d² follows a chi-square distribution on p degrees of freedom. With two variables at the 1% level the cutoff is 9.2103.
Skewed or heavy-tailed data breaks that, usually in the direction of flagging too much — a long right tail produces large distances that are perfectly normal for the data.
The cutoff is also per-point, not per-dataset. At 1% on 200 rows you should expect about two flags from nothing at all, so a couple of flags in a large table is not evidence.
And the degrees of freedom are the number of variables, not the sample size, which is why adding a variable raises the bar for everything.
The failure mode: the outliers define the centre
The most important limitation is structural rather than statistical, and no amount of sample size fixes it.
The mean and the covariance are estimated from the same data the outliers are in. A bad point pulls the centre towards itself and inflates the covariance in its own direction.
With one outlier that is a small bias. With several it is masking: they support each other, the covariance stretches to accommodate them, and none of them is flagged.
Two clustered bad points can hide each other completely. The tell is a distance distribution that looks too uniform, or a condition number that jumps when one row is removed.
The fix is a robust estimator — minimum covariance determinant or a similar method, which fits the centre to a trimmed subset. This page uses the classical estimator, which is the right tool for screening and the wrong one for data you already suspect is heavily contaminated.
When two variables are the same thing twice
The third preset exists because this failure is silent, and the condition number on the page is the only warning you get.
Those two columns correlate 0.999775 and the condition number is 8871.55. The second variable is very nearly a fixed multiple of the first.
Inverting a matrix that close to singular amplifies error enormously. A change of 0.1 in one reading can move a distance by a large multiple, so the distances stop being stable quantities.
The arithmetic does not complain. It returns numbers, they look plausible, and they are noise.
The fix is to drop one of the pair before computing anything — or, if the redundancy is spread across several variables rather than living in one pair, to reduce the set with a look at the eigenvalues first.
Reporting a flagged point
Four items, and the second is what stops a reader dismissing the finding as an ordinary z-score in heavier notation.
Give d², the cutoff and the number of variables. The cutoff means nothing without the dimension it was taken at.
Give the single-variable z-scores too. If they are all small, say so — that is the finding, not a footnote to it.
Say how many points were screened. Two flags at the 1% level out of 200 rows is what pure noise produces.
And say the estimator was classical rather than robust, which tells a reader that masking has not been ruled out.
Method. The covariance matrix is inverted by Gauss-Jordan elimination with partial pivoting, and the condition number is reported from the eigenvalues of the correlation matrix so that a near-singular input announces itself rather than returning quiet nonsense. The verification suite leans on an identity rather than on transcribed values: the distances of every row must sum to exactly p(n − 1) when the sample covariance is used, which is true for any data at all and which checks the covariance, the inversion and the quadratic form together. That is asserted on 120 generated datasets, alongside affine invariance — rescaling and shifting every column must leave every distance unchanged, which it does to within 1e-6. The chi-square cutoff comes from the same incomplete gamma routine used across this site. That engine is verified on every change against 90 assertions. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
Covariance MatrixSample covariance and correlation matrices with eigenvalues, determinant and condition number, so redundancy spread across several variables cannot hide from a pairwise scan.
Hotelling T-SquaredOne-sample and two-sample multivariate mean tests with every single-variable t test printed alongside, so the joint answer can be compared against the alternative.
Z-ScoreA z-score from your data or from a known mean and SD — with the normal-table percentile checked against the share of your data that actually falls below it, and a warning when they disagree.
Chi-SquareGoodness of fit and tests of independence with every expected count and per-cell contribution shown — because the validity condition is about expected counts, not observed ones, and most calculators hide them.
OutlierRuns four outlier rules together and says when each is failing — the 3-sigma rule cannot flag anything below n=11, two outliers hide each other, and the quartile convention alone can decide the answer.
Correlation CoefficientReports Pearson, Spearman and Kendall together with the scatter plot, and ships Anscombe's quartet built in — four datasets with an identical r of 0.816 that Spearman tells apart.
An educational tool. The mean and covariance are estimated from the same data being screened, so a heavily contaminated sample can mask its own outliers — a robust estimator is the right tool there. The chi-square cutoff assumes multivariate normality and applies per point, so a few flags in a large table are what chance alone produces.