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)
How it works
- Select 2D for x/y coordinates or 3D to add a z coordinate.
- Enter Point A and Point B; the axis differences update automatically.
- 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
| Feature | Online Tool Store | Graphing calculator | Spreadsheet |
|---|---|---|---|
| 2D and 3D modes | One switch | Needs an entered formula | Needs formulas |
| Shows axis differences | Yes | If requested | If configured |
| Shows substituted expression | Yes | Varies | No by default |
| No setup or sign-up | Yes | Device or app needed | Software 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.