ΣCalcSolver
Geometry & trigonometry

Distance, Midpoint & Slope Calculator

Type the coordinates of two points to get everything about the line segment that joins them: its length, its middle point, its slope, the equation of the full line, and its angle with the x-axis.

Loading the solver…

Quick start

  1. Enter x₁ and y₁ for the first point.
  2. Enter x₂ and y₂ for the second point.
  3. Read the distance, midpoint, slope, equation and angle.

The formulas

Example: (−2, 1) and (4, 9)

The horizontal change is 6 and the vertical change is 8. Distance = √(36 + 64) = 10. Midpoint = (1, 5). Slope = 8 ÷ 6 = 4/3. The line is y = (4/3)x + 11/3, and it rises at about 53.13° from the x-axis.

Reading the slope

A positive slope rises from left to right, a negative slope falls, and zero is flat. If x₁ = x₂ the line is vertical and the slope is undefined.

Connection to Pythagoras

The distance formula is the Pythagorean theorem in disguise. The horizontal and vertical changes are the two legs of a right triangle, and the distance is its hypotenuse.

Common questions

What if both points are the same?

The distance is 0 and no line or slope can be defined.

Are parallel lines given the same slope?

Yes. Perpendicular lines have slopes that multiply to −1.

Can I use decimals?

Yes. Any real coordinates work.