Slope, Distance & Midpoint

Math

From the coordinates of two points, works out the distance between them, the midpoint, the slope of the line, its angle and the perpendicular slope.

MeasureFormula
Distance√((x₂ - x₁)² + (y₂ - y₁)²)
Midpoint((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)
Slopem = (y₂ - y₁) ÷ (x₂ - x₁)
Perpendicular slope-1 ÷ m

A(1, 2) and B(4, 6): distance 5, midpoint (2.5, 4), slope 4/3, angle about 53.13°.

If x₁ = x₂ the line is vertical and the slope is undefined. For roads and ramps, the slope is often given as a percent grade (slope × 100).

Results are for information only. For tax, salary, loan or health decisions, check official sources or ask a professional.

All Math tools