Distance Formula Calculator
This distance formula calculator finds the straight-line distance between two points from their coordinates, in two or three dimensions. Enter (x1, y1) and (x2, y2), plus z values for 3D, and the distance formula calculator returns the distance, the midpoint, and the horizontal and vertical change.
Results
The Distance Formula Calculator is part of our Geometry collection. Browse more geometry to size, convert, and check your work alongside this tool.
What the distance formula calculator shows
The distance formula measures the straight-line, or Euclidean, distance between two points on a coordinate plane. It is the Pythagorean theorem written in coordinates. The distance formula calculator also gives the midpoint, the point exactly halfway between the two. Calculating distance this way works for any pair of points on a plan, a graph, or a model.
Distance formula solver equations
Squaring each difference removes the sign, so the order of the points does not matter.
Find the distance between two points: examples
From (1, 2) to (4, 6):
From (−3, 4) to (2, −8) the distance is √(25 + 144) = 13. In 3D, from (1, 2, 3) to (4, 6, 15), the distance is also 13.
How to use the distance between two points calculator
Enter x1 and y1 for the first point and x2 and y2 for the second. For 3D, add z1 and z2; leave them at 0 for a flat plane. The distance between two points calculator returns the distance, the midpoint, and the changes in x and y. Negative coordinates are fine.
Reading the euclidean distance calculator result
The distance is in the same units as the coordinates. It is the shortest straight path, not the distance along a grid or a road. The midpoint is useful for finding the centre of a segment, such as the centre of a circle from the ends of a diameter.
When to calculate distance from coordinates
- Coordinate geometry homework with the distance formula calculator
- Finding the length between two points on a plan
- Measuring point to point distance in CAD or games
- Finding the midpoint of a segment
Common distance formula calculator mistakes
- Sign errors with negatives. 2 − (−3) = 5.
- Forgetting the square root.
- Adding the gaps directly. That is grid distance, not straight-line distance.
Tips for accurate results
- Write each point as an ordered pair before starting.
- Keep coordinates in the same unit.
- Leave z at 0 for flat problems.
Calculate distance between two coordinates in 3D
Adding a third axis simply adds a third squared term. To calculate distance between two coordinates in space, find the change in x, y, and z, square each, add them, and take the square root. Engineers and game developers use this for the length of any straight line in a model. With three points, finding each side length lets the triangle area calculator work out the area of the triangle they form.
Distance formula calculator and Pythagoras
The change in x and the change in y form the two legs of a right triangle, and the distance is its hypotenuse. That is why (0, 0) to (3, 4) gives 5, the classic 3-4-5 triangle.
Distance formula calculator reference
| Point 1 | Point 2 | Distance | Midpoint |
|---|---|---|---|
| (0, 0) | (3, 4) | 5 | (1.5, 2) |
| (1, 2) | (4, 6) | 5 | (2.5, 4) |
| (−3, 4) | (2, −8) | 13 | (−0.5, −2) |
| (1, 2, 3) | (4, 6, 15) | 13 | (2.5, 4, 9) |
Distance Formula Calculator FAQ
What is the distance formula?
d = √((x2 − x1)² + (y2 − y1)²), with a z term added for 3D.
Does the order of the points matter?
No. Squaring removes the sign of each difference.
How do I find the midpoint?
Average the x values and average the y values.
Is this the same as travel distance?
No. It is the straight-line distance between coordinates, not a road or map route.
