Free · Coordinate geometry
Manhattan Distance and Coordinate Calculator
Calculate the sum of absolute coordinate differences in one, two, three or four dimensions, with a documented coordinate inverse branch.
- Formula & worked example
- Private in your browser
- No signup
Calculator inputs
Loading calculator…
How to use this calculator
- Enter the known values in the units shown. Results update as you type.
- Where results are editable, change one to solve backwards. Lock a value to hold it fixed.
- Use the worked example to check the method. Reset restores the starting fields.
Private by default
Inputs and results stay in this browser tab. Bookify does not upload or store the values you enter.
Formula and method
From (−2, 4) to (3, −1), the Manhattan distance is |−2−3| + |4−(−1)| = 10.
d = Σ |pᵢ − qᵢ|; one inverse coordinate uses qᵢ + remaining distance, or pᵢ + remaining distance.
Worked example
Enter these known values and leave the other values blank.
- x₁
- -2
- x₂
- 3
- y₁
- 4
- y₂
- -1
- Distance
- 10
Assumptions and limitations
- Distance is the sum of absolute coordinate differences on equally scaled axes; all coordinates must use a consistent unit basis.
- A missing coordinate is not uniquely determined by a Manhattan distance. The retained inverse chooses the branch at or above the corresponding coordinate of the other point. Its remaining distance must be nonnegative.
- Coordinates may be negative or zero. Distance may be zero. Select one to four dimensions; hidden dimensions do not contribute to the active result.
- Inverse coordinate differences are evaluated directly before taking their absolute value, including large nearby coordinates; this avoids expanded-square cancellation.
Common questions
What is Manhattan distance?
Add the absolute difference on each axis. In two dimensions, d = |x₁−x₂| + |y₁−y₂|.
Can a distance determine a unique missing coordinate?
A missing coordinate is not uniquely determined by a Manhattan distance. The retained inverse chooses the branch at or above the corresponding coordinate of the other point. Its remaining distance must be nonnegative.
References
Reject negative Manhattan distances and impossible inverse residuals. Each retained inverse selects the coordinate at or above its opposite coordinate; the other branch is not unique. Compute every inverse remaining coordinate difference directly before taking its absolute value, avoiding catastrophic cancellation in expanded squares of large nearby coordinates.