Find the Manhattan (taxicab) distance between two points, with Euclidean and Chebyshev distances for comparison.
Result
How to use this tool
Enter (x1, y1) and z1, or 0 for z in two dimensions.
Enter (x2, y2) and z2.
Read the grid distance, the headline result.
Compare with the Euclidean and Chebyshev distances to see how the grid constraint changes the answer.
Formula & worked example
Between (1, 2) and (4, 6): Manhattan distance = |4 − 1| + |6 − 2| = 7, versus a straight-line distance of 5.
Limitations — read this before you rely on it
Coordinate geometry only. It assumes movement along the axes; obstacles, one-way streets and terrain are not modelled.
Frequently asked questions
The sum of the absolute differences of coordinates: the distance travelled along a grid, like city blocks.
A taxi in a grid city cannot cut diagonally through blocks; it must travel along streets.
Whenever the points differ along more than one axis; diagonal shortcuts are not allowed.
The largest single-axis difference: the king’s move distance in chess.
Grid pathfinding, clustering, image processing and anywhere movement is axis-aligned.
