MATH

Slope Calculator: Slope, Line Equation & Grade

Slope = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁). From (2, 3) to (6, 11) the line rises 8 over a run of 4, so the slope is 2 and the line is y = 2x − 1.

  • Exact fractions
  • 3 equation forms
  • Grade, angle & ramps
Find a slope
Example · (1, 2) to (5, 5)
  • Rise (y₂ − y₁)3
  • Run (x₂ − x₁)4
  • Liney = (3/4)x + 5/4
  • Standard form3x − 4y = −5
mSlope3/4

To find the slope between two points, subtract the y-values and divide by the difference of the x-values: m = (y₂ − y₁) ÷ (x₂ − x₁). For (1, 2) and (5, 5), that's (5 − 2) ÷ (5 − 1) = 3/4, or 0.75: the line rises 3 units for every 4 it runs. This slope calculator keeps the answer as an exact fraction, shows the steps, and gives the line in slope-intercept, point-slope and standard form, from two points or from one point and a slope. Switch to grade mode to turn rise over run into a percent, an angle or a ramp ratio such as 1:12.

Last updated November 13, 2026  How we calculate

Find
Point 1 (x₁, y₁)
Point 2 (x₂, y₂)

Whole numbers, decimals (2.5), negatives (−3) or fractions (3/4, 1 1/2).

Sketch of the line, not to scale.

Slope

Slope (m)

2

y = 2x − 1 · rises 8 for every 4 across

Slope results
Slope2
Slope-intercept formy = 2x − 1
Point-slope formy − 3 = 2(x − 2)
Standard form2x − y = 1
y-intercept−1 → (0, −1)
x-intercept1/2 (0.5) → (1/2, 0)
Angle63.43°
Percent grade200%
Distance8.9443
Midpoint(4, 7)
Perpendicular slope−1/2 (−0.5)
  1. m = (y₂ − y₁) ÷ (x₂ − x₁) = (11 − 3) ÷ (6 − 2) = 8 ÷ 4
  2. m = 2
  3. b = y₁ − m × x₁ = 3 − 2 × 2 = −1
  4. Distance = √(4² + 8²) = √80 ≈ 8.9443; midpoint = (4, 7)

How to Find the Slope From Two Points

  1. Label the points (x₁, y₁) and (x₂, y₂). Either point can be first; you get the same slope.
  2. Find the rise: y₂ − y₁.
  3. Find the run: x₂ − x₁.
  4. Divide rise by run and simplify the fraction (OpenStax College Algebra 2e, 4.1).

For (−1, 4) and (3, −2): the rise is −2 − 4 = −6 and the run is 3 − (−1) = 4, so m = −6/4 = −3/2. Watch the signs when you subtract a negative number. Swapping the points gives (4 − (−2)) ÷ (−1 − 3) = 6/−4, the same −3/2.

Slope-Intercept, Point-Slope and Standard Form

Once you have the slope, the same line can be written three ways (OpenStax, 4.1 and 2.2). If you have one point and the slope instead of two points, choose "Line from a point and a slope" in the calculator.

The line through (−1, 4) and (3, −2)
FormPatternThis line
Slope-intercepty = mx + by = −(3/2)x + 5/2
Point-slopey − y₁ = m(x − x₁)y − 4 = (−3/2)(x + 1)
StandardAx + By = C3x + 2y = 5

To get b, the y-intercept, put one point into y = mx + b: 4 = (−3/2)(−1) + b, so b = 4 − 3/2 = 5/2. Standard form clears the fractions: multiply y = −(3/2)x + 5/2 by 2 and move the x term across to get 3x + 2y = 5, with whole numbers and a positive x term.

Positive, Negative, Zero and Undefined Slope

Slope as a Percent, Angle or Ratio

The same slope can be written as rise ÷ run, a percent grade (slope × 100), an angle (the arctangent of the slope) or a ratio 1:N, where N = run ÷ rise. Roads, roofs and ramps use different ones:

Common slopes in each form
RatioSlopePercent gradeAngle
1:1000.011%0.57°
1:480.02082.08%1.19°
1:200.055%2.86°
1:120.08338.33%4.76°
1:100.110%5.71°
1:80.12512.5%7.13°
1:40.2525%14.04°
1:20.550%26.57°
1:11100%45°

A 100% grade is a 45° angle, rising 1 for every 1 across, not a vertical wall. Percent grade and angle aren't proportional: doubling the angle doesn't double the grade.

Wheelchair Ramp Slope (ADA 1:12)

Under the ADA Standards, a ramp's running slope can be no steeper than 1:12, and a single run can rise no more than 30 inches before a landing (U.S. Access Board, Guide to the ADA Standards, Chapter 4). A walking surface steeper than 1:20 counts as a ramp (2010 ADA Standards, 106.5). At 1:12, every inch of rise needs at least 12 inches of horizontal run: a 24-inch rise needs at least 24 feet of run, not counting landings, and a 36-inch rise needs two runs with a landing between them. 1:12 is a slope of 8.33% or about 4.76°. Choose grade mode and enter the rise to see the minimum run. Check your local building code before you build.

Parallel and Perpendicular Lines

Parallel lines have the same slope. Perpendicular lines have slopes that are negative reciprocals: flip the fraction and change the sign (OpenStax, 4.1). A line with slope 3/4 is perpendicular to any line with slope −4/3, and a horizontal line (slope 0) is perpendicular to a vertical one. The calculator shows the perpendicular slope for your line.

Frequently Asked Questions

What is the formula for slope?

m = (y₂ − y₁) ÷ (x₂ − x₁): the change in y divided by the change in x between two points on the line, often called rise over run.

How do I find the slope from an equation?

Rearrange it into y = mx + b; the number in front of x is the slope. For 3x + 2y = 5, solve for y: y = −(3/2)x + 5/2, so the slope is −3/2.

What does a slope of 0 or undefined mean?

A slope of 0 is a flat, horizontal line. An undefined slope is a vertical line, because the run is 0 and you can't divide by 0.

How do I convert slope to a percent?

Multiply the slope by 100. A slope of 1/12 is 8.33%, a slope of 0.05 is 5%, and a slope of 1 is 100%.

How do I find the distance between two points?

Use d = √((x₂ − x₁)² + (y₂ − y₁)²) (OpenStax, 2.1). From (2, 3) to (6, 11) it's √(4² + 8²) = √80 ≈ 8.9443. The calculator shows it with the midpoint.

More tools are on the math calculators page, including the Pythagorean theorem calculator (the distance formula is the same idea), the area calculator and the percentage calculator.

Sources