Manhattan Distance Calculator
Result
Manhattan distance7
↗ Math
Manhattan Distance Calculator: calculate manhattan distance using defined numerical inputs.
Formula
|x2−x1| + |y2−y1|
- Model: |x2−x1| + |y2−y1|. Two-dimensional city-block (L1) distance; not straight-line distance. This tool performs the stated calculation on user-provided inputs; it is not an official certification.
- The main inputs are x1, y1, x2, y2. Enter them in the units and format shown in the calculator.
- Keep comparable quantities in compatible units whenever the formula combines or compares them.
- Changing any input above recalculates the result with the same calculation engine used by this page.
Example: Manhattan Distance
Inputs
- x1: 0
- y1: 0
- x2: 3
- y2: 4
Using x1 = 0, y1 = 0, x2 = 3, y2 = 4, the calculated result is Manhattan distance: 7.
Sample result: Calculating…
Frequently asked questions
What does the Manhattan Distance calculate?
Manhattan Distance Calculator: calculate manhattan distance using defined numerical inputs.
Which values should I enter?
Enter x1, y1, x2, y2 using the units and format shown beside each field.
What formula does this calculator use?
The calculator uses the following relationship: |x2−x1| + |y2−y1|.
Why might my result differ from another source?
Results can differ when another source uses different units, rounding rules, conventions or assumptions. Compare the inputs and definitions before comparing results.
Does the result update automatically?
Yes. Changing an input updates the result using the same calculation engine shown on this page.