Search tools

Search for a command to run...

Slope, Distance & Midpoint Calculator

Find the slope, line equation (y = mx + b), distance, midpoint and angle between two points on a coordinate plane.

How to use

  1. 1Enter the coordinates of two points (x₁, y₁) and (x₂, y₂).
  2. 2Read the slope, equation, distance and midpoint.

How it's calculated

Slope m = (y₂ − y₁) ÷ (x₂ − x₁). b = y₁ − m x₁. Distance = √((x₂ − x₁)² + (y₂ − y₁)²). Midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2).

Frequently asked questions

What does a negative slope mean?

The line goes down from left to right.

What is the slope of a vertical line?

Undefined — the run is zero. Its equation is x = constant.

How do I convert slope to an angle or grade?

Angle = arctan(slope). A slope of 0.05 is a 5% grade, about 2.86°.