Minkowski Distance Calculator
Calculate the generalized Minkowski distance between two vectors with a configurable order.
About Minkowski Distance Calculator
Minkowski distance generalizes both Euclidean (p=2) and Manhattan (p=1) distances using a configurable p parameter. Higher p values give more weight to the largest single-dimension difference, while lower p values spread weight more evenly across dimensions.
Formula
Minkowski Distance
d(a, b) = (sum(|a_i - b_i|^p))^(1/p)
- p
- Order of the norm (1=Manhattan, 2=Euclidean)
Worked example
With the default values below, Minkowski Distance Calculator returns Minkowski Distance of 4.326749. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Vector A
- 1, 2, 3
- Vector B
- 4, 5, 6
- P (order)accepts 1–100
- 3
Results
- Minkowski Distance
- 4.326749
- Dimensions
- 3
Step by step
- 1Sum of |aᵢ − bᵢ|^3= 81.0000
- 2p-th root= 4.326749
Assumptions and limits
- The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
What values of p are most common?
p=1 (Manhattan), p=2 (Euclidean), and p=∞ (Chebyshev, max absolute difference) are the most commonly used. Fractional p values between 0 and 1 are sometimes used in high-dimensional data.
How does p affect the distance behavior?
As p increases, the metric becomes more sensitive to the single largest coordinate difference. In the limit (p→∞), Minkowski distance equals the maximum absolute difference across all dimensions.
