Quick start
- Enter x₁ and y₁ for the first point.
- Enter x₂ and y₂ for the second point.
- Read the distance, midpoint, slope, equation and angle.
The formulas
- Distance: √((x₂ − x₁)² + (y₂ − y₁)²)
- Midpoint: ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)
- Slope: m = (y₂ − y₁) ÷ (x₂ − x₁)
- Line: y = mx + c, where c = y₁ − m·x₁
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.