Skip to main content
Math

Slope Calculator

Find the slope of a line from two points. Get rise over run, the line equation, angle, distance and grade percentage in one step.

Two points on the line

Enter the coordinates of both points.

Slope is rise over run: m = (y₂ − y₁) / (x₂ − x₁). A horizontal line has slope 0; a vertical line has an undefined slope.

Result

Slope (m)

2

y = 2x − 1

Line equation
y = 2x − 1
Rise (Δy)
12
Run (Δx)
6
Angle from horizontal
63.43°
Distance between points
13.4164
y-intercept (b)
-1
Grade
200%

How to use the Slope calculator

  1. 1

    Enter the coordinates of the first point (x₁, y₁).

  2. 2

    Enter the coordinates of the second point (x₂, y₂).

  3. 3

    Read the slope, y-intercept, line equation, angle and distance.

Frequently asked questions

What is the slope formula?

Slope m equals rise over run: m = (y₂ − y₁) / (x₂ − x₁). A positive slope rises to the right, a negative slope falls, and a horizontal line has slope 0.

What is a vertical line’s slope?

A vertical line has an undefined slope because the run (x₂ − x₁) is zero. The calculator reports the line as x = constant.

How is slope converted to degrees?

The angle of a line is the inverse tangent of the slope: angle = atan(m) × 180 / π. A slope of 1 is 45 degrees.