Slope calculator

Slope m = (y₂ − y₁) ÷ (x₂ − x₁). Through (1, 2) and (4, 8) the slope is 2 and the line is y = 2x.

m = 2
slope through (1, 2) and (4, 8)
y = 2x + 0slope-intercept form
63.4349°angle of the line
200%grade
6.708204distance
  1. Rise: y₂ − y₁ = 8 − 2 = 6
  2. Run: x₂ − x₁ = 4 − 1 = 3
  3. Slope = rise ÷ run = 6 ÷ 3 = 2
  4. Intercept: b = y₁ − m·x₁ = 0

Formula

m = (y₂ − y₁) / (x₂ − x₁)   y = mx + b, b = y₁ − m·x₁

Slope, angle and grade

SlopeAngleGrade
00°0%
0.052.86°5%
0.15.71°10%
0.2514.04°25%
0.526.57°50%
145°100%
263.43°200%
578.69°500%

A positive slope rises left to right, negative falls, zero is horizontal, and a vertical line has an undefined slope.

Frequently asked questions

What is the slope of a horizontal line?
0.
How do I convert slope to an angle?
Angle = arctan(slope). A slope of 1 is 45°.