Distance between two points calculator (x, y)

Type the coordinates of two points and the calculator gives the straight-line distance between them, with the distance formula worked out line by line.

Live demo · real result from this tool
Distance5
Δx
3
Δy
4
Manhattan distance
7

Working

d = √((x₂ − x₁)² + (y₂ − y₁)²)  = √((4 − 1)² + (6 − 2)²)  = √(9 + 16) = √25 = 5

Processed on your device — nothing is uploaded.

How to use the distance calculator

  1. Enter the first point in x₁ and y₁.
  2. Enter the second point in x₂ and y₂.
  3. Read the Distance. Below it you get Δx, Δy and the Manhattan distance.
  4. Copy the Working box if you need to show your method.

What it does and when to use it

Plot two points on graph paper and join them with a ruler: this tool measures that line. Students use it for coordinate-geometry homework, such as checking whether a triangle is isosceles or finding the radius of a circle from its centre and a point on it. It also helps in game design, CAD drawings and any grid where you need “how far apart” in a straight line.

If you also want the midpoint and the slope, the coordinate line properties tool gives all of them at once. For points with a z value, use the 3D distance calculator.

How it works

The tool uses the distance formula:

d = √((x₂ − x₁)² + (y₂ − y₁)²)

It first finds the change in each direction, Δx = x₂ − x₁ and Δy = y₂ − y₁. Those are the legs of a right triangle, so the Pythagorean theorem gives the hypotenuse. The Manhattan distance is |Δx| + |Δy|.

Worked examples

Step by step. From (−3, 2) to (5, −4).

  1. Δx = 5 − (−3) = 8.
  2. Δy = −4 − 2 = −6.
  3. Square them: 8² = 64 and (−6)² = 36.
  4. Add and take the root: the working ends √(64 + 36) = √100 = 10.

The tool also reports Manhattan distance: 14, because a grid path would go 8 across and 6 down.

A distance that is not whole. From (2, 3) to (7, 5): Δx = 5 and Δy = 2, so d = √29, shown as Distance: 5.385164807. In an exam you may be asked to leave it as √29; the working line shows that form.

Limits and tips

  • Watch the signs when subtracting a negative number. The working writes it as “5 − -3”, which means 5 + 3.
  • The tool has no units. The answer is in the same unit as your coordinates.
  • Results are shown to up to 10 significant figures.
  • Nothing is sent anywhere; the sums run in your browser.

Frequently asked questions

Does it matter which point I enter first?
No. Swapping the points flips the signs of Δx and Δy, but squaring removes the sign, so the distance is the same.
What is the Manhattan distance?
The distance if you can only move along the grid, like walking city blocks. It is |Δx| + |Δy|. It is never shorter than the straight-line distance.
Can the coordinates be negative or decimal?
Yes. Any real numbers work, for example (−3, 2) or (1.5, −0.25).
Why is the distance formula like the Pythagorean theorem?
Δx and Δy are the two legs of a right triangle and the distance is its hypotenuse, so d² = Δx² + Δy². It is the same rule in coordinate form.
Can I use it for places on a map?
Only for small areas drawn on a flat grid. Latitude and longitude lie on a curved Earth, so they need a great-circle formula instead.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close