Distance Between Two Points
Enter the coordinates of two points to find the straight-line distance between them in 2D or 3D space - plus the midpoint and slope, with the full working shown step by step.
Enter Coordinates
Point 1
Point 2
Additional Values
Distance & Related Formulas
2D Distance Formula
3D Distance Formula
Midpoint
3D: also (z₁+z₂)/2
Slope (2D only)
Undefined when x₂ = x₁ (vertical line)
Worked Example
Distance between (2, 3) and (8, 7):
d = √[36 + 16]
d = √52 ≈ 7.2111
Frequently Asked Questions
Distance Between Two Points Calculator - 2D & 3D Coordinate Geometry
The distance formula is one of the most widely used tools in coordinate geometry, appearing everywhere from high school algebra homework to computer graphics, navigation systems, and physics simulations. It calculates the straight-line ("Euclidean") distance between any two points, and this calculator handles both 2D and 3D coordinates while also showing the midpoint and slope.
Quick example: Distance from (2,3) to (8,7) = √52 ≈ 7.2111
Where the Formula Comes From
The distance formula is really just the Pythagorean theorem in disguise. If you draw a right triangle where the horizontal leg is the difference in x-coordinates and the vertical leg is the difference in y-coordinates, then the straight-line distance between the two points is the hypotenuse. Since a² + b² = c², the distance is √(a² + b²) - exactly what the distance formula computes. Extending to 3D simply adds a third squared term for the z-axis difference.
Related Values This Calculator Also Finds
- Midpoint: The exact center point between the two coordinates, found by averaging each coordinate pair.
- Slope (2D only): The steepness of the line connecting the points, calculated as rise over run. A vertical line has an undefined slope.
- Δx and Δy: The horizontal and vertical differences between the points, useful for understanding direction as well as distance.
How this calculator works, and where the numbers come from
The Distance Between Points applies the standard formula for this calculation to the values you enter and updates the result as you type. The calculation itself happens in your browser, and the page explains the method so you can check any result by hand.
Please note: Results are provided for general information and are calculated from the values you enter.