Mahalanobis distance calculator
Paste two to four variables and enter the target coordinates. Get D, D² and an indicative p-value.
Data and target point
For two variables the plot shows observations and the target point.
Target point components
| Variable | Target | Mean | Difference |
|---|---|---|---|
| Fill in the fields above — the result is computed on this page. | |||
How do I use this page?
- Paste equal-length series for 2–4 variables.
- Enter the target point coordinates.
- Assess D together with the plot and data assumptions.
What this page does not do: You need more observations than variables and an invertible covariance matrix. The p-value is model-based, not a universal anomaly threshold.
Further reading
Theory — what is Mahalanobis distance?
Mahalanobis distance measures how much a point deviates from a set of variables, taking into account not just the difference from the mean but also the variances and correlations between those variables. As a result, a deviation along a direction where the data naturally spreads out counts for less than an equally sized move along a direction that is rare for that data. The D² value can be translated roughly into a p-value, showing how unusual the point is. Unlike Euclidean distance, this method scales units on its own.
Frequently asked questions
How does it differ from Euclidean distance?
Why is there no result?
See also
A/B test calculator
Compare two proportions in an A/B test. Calculate conversion rates, difference, uplift, z score, p value and c
A/B test planning — sample size, MDE and duration
Plan a two-proportion experiment, estimate detectable effect and traffic duration.
ACF and PACF autocorrelation calculator
Calculate ACF and PACF across time-series lags. Review the chart, reference bounds and coefficient table.