Slope calculator

Get slope, equation, distance, midpoint, angle, and perpendicular slope from two points.

Point 1

Point 2

For (x₁,y₁) and (x₂,y₂): m = Δy/Δx, equation y = mx + b, distance = √(Δx² + Δy²), angle = atan2(Δy,Δx). Vertical lines report x = c with no slope; perpendicular slope is −1/m.

Everything runs in this browser.

How to use

  1. Enter point 1 (x₁, y₁) and point 2 (x₂, y₂).
  2. Read the slope and the line equation.
  3. Check distance, midpoint, angle, and perpendicular.

What it supports

m = Δy/Δx, y = mx + b, plus distance, midpoint, angle, and perpendicular slope. A vertical line reports x = c with no slope (its perpendicular is horizontal, 0); a horizontal line has no perpendicular. Identical points are rejected (no line is defined).

Related tools

Related guides