How to Use the Two-Point Distance Calculator
Enter the x and y coordinates of two points to instantly calculate the straight-line distance between them, the coordinates of the midpoint, and the slope of the line connecting them.
Formulas Used
Distance: d = β((xββxβ)Β² + (yββyβ)Β²) β derived from the Pythagorean theorem. Midpoint: M = ((xβ+xβ)/2, (yβ+yβ)/2). Slope: m = (yββyβ)/(xββxβ).
Vertical Lines and Undefined Slope
When both points share the same x-coordinate, the connecting line is vertical. Slope requires dividing by Ξx = 0, which is undefined. The calculator displays "Undefined (vertical line)" clearly rather than showing an error or wrong value.
Practical Applications
Finding the radius of a circle (distance from center to a point on the circle), locating the midpoint of a line segment, writing the equation of a line using point-slope form, and verifying geometric properties in coordinate proofs.
Frequently Asked Questions
Yes. Negative coordinates work exactly the same. For example, P1(β3, 2) and P2(1, β4) gives d = β(16+36) = β52 β 7.2111.
The distance is 0, the midpoint equals the point itself, and the slope is 0 Γ· 0 β undefined. All results are still shown, with slope displayed as "Undefined."
The output units match your input units. Enter coordinates in meters and the distance is in meters; enter in feet, and distance is in feet.