Distance Formula Calculator

Calculate the straight-line distance between two points in two or three dimensions, with the midpoint and Manhattan distance.

Distance 5
d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)
Distance ignoring z 5
Manhattan distance 7
Midpoint x 1.5
Midpoint y 2
Midpoint z 0

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Distance Formula Calculator does

The distance formula calculator on this page will calculate the straight-line distance between two points in two or three dimensions, with the midpoint and Manhattan distance. Fill in all 6 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for finding the distance between two points on a plan or map grid. We run a second free tools site as well — FreeToolsWorld.org.

How to use it

  1. Enter the coordinates of both points.
  2. Leave the z values at zero for a two-dimensional problem.
  3. The midpoint is calculated alongside the distance.
  4. Manhattan distance is the sum of the axis differences, used in grid-based problems.

When to use it

  • Finding the distance between two points on a plan or map grid.
  • Calculating 3D distances in CAD or game coordinates.
  • Finding a midpoint for placing something exactly between two markers.

Common mistakes to avoid

  • Forgetting to square the differences before adding them.
  • Using Euclidean distance where movement is restricted to a grid, which Manhattan distance describes better.

Frequently asked questions

What is Manhattan distance?

The distance travelled moving only along the axes, as if on a street grid. For points 3 across and 4 up, Euclidean distance is 5 but Manhattan distance is 7.

How do I use this for 2D only?

Leave both z values at zero. The main result and the "ignoring z" row will then agree.

Related tools

See all math & statistics calculators →