1. Home
  2. Math
  3. Slope Calculator

Slope Calculator

Slope is rise over run: m = (yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚). From (1, 2) to (5, 10) the slope is 8 รท 4 = 2.

Building a ramp or checking a road grade? The result also gives the angle in degrees and the slope as a percent grade.

Slope between two points

Answer โ€”

How we got this

    Your next step

    Your answer carries over, so you donโ€™t have to type it again.

    The slope formula

    m = (yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚)

    A positive slope rises from left to right, a negative one falls, a slope of 0 is flat, and a vertical line has an undefined slope because the run is 0.

    Worked example

    From (1, 2) to (5, 10): rise = 10 โˆ’ 2 = 8, run = 5 โˆ’ 1 = 4, so m = 2. The angle is arctan(2) โ‰ˆ 63.43ยฐ, and the line is y = 2x + 0.

    Slope, angle and percent grade

    Ratio (rise:run)Percent gradeAngle
    1:205%2.86ยฐ
    1:128.33%4.76ยฐ
    1:1010%5.71ยฐ
    1:425%14.04ยฐ
    1:250%26.57ยฐ
    1:1100%45ยฐ

    A 1:12 ramp is the maximum slope many accessibility codes allow for wheelchair ramps, including the US ADA standard. Check your local building rules.

    Equation of the line

    Once you know m, find the y-intercept b = yโ‚ โˆ’ m ร— xโ‚. The line is then y = mx + b. Two points always define exactly one straight line.

    Frequently asked questions

    How do you find the slope between two points?

    Subtract the y-values and divide by the difference in x-values: m = (yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚).

    What is a 1:12 slope in degrees?

    About 4.76ยฐ, or an 8.33% grade.

    How do I convert slope to percent grade?

    Multiply the slope by 100. A slope of 0.05 is a 5% grade.

    What does an undefined slope mean?

    The line is vertical: x does not change, so the run is 0 and you cannot divide by it.

    Last updated ยท Written and checked by the AzCalculator team ยท Calculations run in your browser with full precision and are rounded only for display. How we build calculators