๐Ÿ“Two-Point Distance Calculator

Enter two coordinate points โ†’ get distance, midpoint, and slope instantly

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

Can I enter negative coordinates?

Yes. Negative coordinates work exactly the same. For example, P1(โˆ’3, 2) and P2(1, โˆ’4) gives d = โˆš(16+36) = โˆš52 โ‰ˆ 7.2111.

What if both points are the same?

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."

What units does the result use?

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.