Online Tool Store Online Tool Store

Distance Between Points

Calculate the straight-line distance between two points in 2D or 3D coordinates, with axis differences and the formula clearly shown.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

Coordinate space

Example: A(1, 2) to B(7, 10)

Point A
Point B

How it works

  1. Select 2D for x/y coordinates or 3D to add a z coordinate.
  2. Enter Point A and Point B; the axis differences update automatically.
  3. Read the straight-line distance and the substituted formula.

The distance formulas

2D: d = sqrt((x2 - x1)^2 + (y2 - y1)^2)
3D: d = sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2)

This is the Pythagorean theorem applied across two or three perpendicular axes. In the loaded 2D example, the differences are 6 and 8, so the distance is sqrt(36 + 64) = 10.

FAQ

What kind of distance does this calculate?

It calculates Euclidean straight-line distance: the shortest line between the two coordinates in a flat 2D or 3D coordinate system.

Can coordinates be negative or decimal numbers?

Yes. Every coordinate accepts positive numbers, negative numbers, zero, and decimals.

Does this calculate distance between latitude and longitude?

No. Geographic coordinates lie on a curved Earth and need a great-circle formula such as haversine, not this Cartesian distance formula.

What units is the answer in?

The answer uses the same unit as the coordinates. If coordinates are measured in meters, the resulting distance is in meters.

How we compare

FeatureOnline Tool StoreGraphing calculatorSpreadsheet
2D and 3D modesOne switchNeeds an entered formulaNeeds formulas
Shows axis differencesYesIf requestedIf configured
Shows substituted expressionYesVariesNo by default
No setup or sign-upYesDevice or app neededSoftware needed

For a quick Cartesian distance with the working shown, Distance Between Points is faster than setting up the formula in a general calculator or spreadsheet.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.