ratio.

Find a tool

Browse all tools and categories ↗
MAHALANOBIS DISTANCE

Mahalanobis Distance Calculator

Calculate covariance-scaled multivariate distance from an entered point, center and positive-definite covariance matrix.

Enter your values

01 / INPUT
Calculated on your device

YOUR CALCULATION

Result

—

Calculation steps

Work through one step at a time or reveal the complete calculation. The steps use your current inputs.

    How to calculate

    Check symmetry and positive definiteness, solve the lower-triangular system and sum squared whitened coordinates.

    D²=(x−μ)ᵀ Σ⁻¹(x−μ); solve a Cholesky-whitened vector instead of explicitly inverting Σ

    Worked example

    Point (2,1), center (0,0) and diagonal covariance (4,1) give squared distance 2 and Mahalanobis distance √2.

    Assumptions and input details

    2–10 dimensions, matching covariance size, well-conditioned positive-definite covariance. Matrix is supplied rather than fitted. No automatic outlier threshold, chi-square p-value or causal/clinical interpretation.

    Using this calculator

    Can I enter my own problem?

    Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.

    Are the results exact?

    Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.

    Is my input uploaded?

    The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.

    RELATED TOOL · MATHEMATICS2×2 Matrix Calculator

    Add, subtract or multiply two 2×2 matrices, or find the inverse of A. Enter each cell separately and follow row-by-column arithmetic in the result table.

    RELATED TOOL · TWO VARIABLE PCATwo Variable PCA Calculator

    Calculate two-variable principal-component variances and loadings from paired observations.

    RELATED TOOL · MEASUREMENTIndependent Measurement Uncertainty Calculator

    Propagate independent standard uncertainties through a sum, difference, product or quotient using first-order sensitivities.

    ADVERTISEMENT

    Reserved advertising space.