Chebyshev Distance Calculator
Compute the Chebyshev (L∞) distance between two points or two vectors of any dimension, in your browser. It is the largest single coordinate difference — the chessboard king-move metric — shown with the dominant dimension and the Manhattan, Euclidean and Minkowski comparisons. No signup, nothing uploaded.
How it works
Chebyshev distance — also called the L∞, maximum, or chessboard distance — is the largest of the coordinate-wise absolute differences between two points. For two equal-length vectors a = [a₁…aₙ] and b = [b₁…bₙ], only the single most-divergent dimension matters. It is the metric SciPy exposes as distance.chebyshev and scikit-learn exposes as the KNN metric "chebyshev".
d∞(a, b) = maxᵢ |aᵢ − bᵢ| = max( |a₁ − b₁|, … , |aₙ − bₙ| )
The tool computes this in three steps:
- Per-dimension difference. Subtract the vectors coordinate by coordinate and take the absolute value:
|dᵢ| = |aᵢ − bᵢ|. - Take the maximum. The Chebyshev distance is the largest of those absolute differences,
max |dᵢ|. The dimension that attains it is the dominant dimension; when several tie, they all count. - Comparison metrics. Over the same differences the tool also reports Manhattan
Σ |dᵢ|, Euclidean√Σ dᵢ²and Minkowski of order 3(Σ |dᵢ|³)^⅓, the other members of the same Lₚ family.
Chebyshev is the p → ∞ limit of the Minkowski distance. Writing the Minkowski distance as max·(Σ (|dᵢ|/max)^p)^(1/p), every ratio below 1 vanishes as p grows and only the maximal term survives, so the whole expression tends to the maximum. That is why the ordering Chebyshev ≤ Minkowski(3) ≤ Euclidean ≤ Manhattan always holds for the same pair of points, and the calculator surfaces it under the result. All arithmetic is done in double-precision floating point and rounded only for display; the Minkowski route normalises by the maximum first, so even inputs around 10⁹ never overflow. As a credibility check the tool recomputes the Chebyshev distance a second way — by sorting the absolute differences and taking the largest — and confirms the two routes agree exactly.
Worked examples
Frequently asked questions
Sources & references
- SciPy — scipy.spatial.distance.chebyshev (the canonical max(|u − v|) definition we match)
- scikit-learn — sklearn.metrics.DistanceMetric (the KNN metric "chebyshev" and its p → ∞ Minkowski limit)
- Wikipedia — Chebyshev distance (the L∞ / chessboard framing and king-move example)
The formulas on this page were last cross-checked against these sources on 2026-07-16. Chebyshev distance is a stable mathematical definition, so this tool needs no rate or schedule updates — only the worked examples are periodically re-reconciled.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.