Mahalanobis Distance Calculator

Enter the point, mean, and covariance values to compute Mahalanobis distance.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

The Mahalanobis distance measures how far a point is from a distribution's mean, but unlike ordinary Euclidean distance it accounts for the correlation and spread between variables by dividing through the distribution's covariance matrix: D² = (x − μ)ᵀ Σ⁻¹ (x − μ). A point that's far along a direction where the data varies a lot is treated as less unusual than the same distance along a direction where the data barely varies.

This makes it a standard tool in multivariate outlier and anomaly detection, cluster analysis, quality control, and classification — for example flagging fraudulent transactions, detecting faulty sensor readings, or measuring how typical a new observation is relative to a training dataset in machine learning pipelines.

This calculator takes a two-variable point, the distribution's mean, and its 2×2 covariance matrix, then computes the Mahalanobis distance directly. Statisticians, data scientists, and students learning multivariate statistics use it to verify hand calculations or sanity-check outputs from statistical software.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators