Skip to content
School

Slope Calculator: Slope From Two Points

This slope calculator finds the slope between two points using rise over run, then the angle of inclination, percent grade, distance, and the line equation.

Horizontal coordinate of the first point.

Vertical coordinate of the first point.

Horizontal coordinate of the second point.

Vertical coordinate of the second point.

Slope

Rise (y2 − y1)
6
Run (x2 − x1)
3
Slope m
2
Angle
63.43°
Percent grade
200%
Distance
6.7082
Intercept b
0
Equation
y = 2x
  1. Rise = y2 − y1 = 8 − 2 = 6.
  2. Run = x2 − x1 = 4 − 1 = 3.
  3. Slope m = rise ÷ run = 6 ÷ 3 = 2.
  4. Angle = arctan(m) = 63.43°.
  5. Percent grade = m × 100 = 200%.
  6. Distance = √(rise² + run²) = √45 = 6.7082.
  7. Intercept b = y1 − m × x1 = 2 − 2 × 1 = 0.
  8. The equation is y = 2x.

Slope is rise over run. A vertical line has no slope because the run is 0. The math stays in your browser.

How to use

  1. Enter the first point (x1, y1) and the second point (x2, y2).
  2. Read the rise (y2 − y1) and the run (x2 − x1). Slope m is rise divided by run.
  3. Check the angle in degrees, the percent grade (slope × 100), and the distance between the points.
  4. Read the intercept and the equation y = mx + b. A vertical line has an undefined slope and the equation x = a constant.

Formula

Slope m = (y2 − y1) / (x2 − x1), rise over run. The angle of inclination is arctan(m), in degrees. Percent grade is m × 100. Distance is √(rise² + run²). The y-intercept is b = y1 − m × x1, so the line is y = mx + b. If the run is 0 and the rise is not, the line is vertical, the slope is undefined, and the equation is x = x1.

Example. Points (1, 2) and (4, 8) have rise 8 − 2 = 6 and run 4 − 1 = 3, so m = 6 / 3 = 2. The angle is about 63.43°, the grade is 200%, the distance is √45 ≈ 6.7082, and b = 0, so y = 2x.

Example. A rise of 1 over a run of 12 is m = 1/12 ≈ 0.0833, about 4.76°, and a percent grade of about 8.33%.

Frequently asked questions

What is the slope formula?

m = (y2 - y1) / (x2 - x1), the change in y divided by the change in x (rise over run).

What does a negative slope mean?

The line goes down from left to right. A zero slope is horizontal.

What is the slope of a vertical line?

Undefined, because x2 - x1 = 0 and you cannot divide by zero.

How do I convert slope to an angle?

Angle = arctan(m). A slope of 1 is 45 degrees.

How do I convert slope to percent grade?

Multiply the slope by 100. A rise of 1 over a run of 12 is about 8.33%.