Slope Calculator

Find the slope of a line from two points, or from rise and run, with the angle and grade as well.

What do you want to work out?

Free, no signup. Everything is worked out in your browser and nothing you type is sent to us.

Slope (m)

How steep is it?

Slope measures how steep a line is: how much it rises for each step to the right. It is the m in y = mx + b, the gradient of a hill, the pitch of a ramp. A slope of 2 climbs 2 units for every 1 across; a slope of 0 is flat; a negative slope goes downhill.

Give this slope calculator two points and it finds the slope, the y-intercept, the full line equation, the angle in degrees and the grade as a percentage. If you already know the rise and the run, as for a ramp or a path, use the second mode.

How to use it

  1. Choose Two points or Rise and run.
  2. Enter the coordinates of both points, or the rise and the run. Negative numbers are fine.
  3. Read the slope, then the equation of the line, the y-intercept, the angle and the grade.
  4. If the run is 0, the line is vertical and its slope is undefined; the calculator says so.

The slope formula

m = (y2 − y1) ÷ (x2 − x1) = rise ÷ run
b = y1 − m × x1, which gives the line y = mx + b
angle = arctan(m); grade = m × 100%

The order of the points does not matter, as long as you keep it the same on the top and the bottom. Grade is how roads, ramps and paths are usually described: a 5% grade rises 5 units for every 100 across.

Worked example: (2, 3) and (6, 11)

  • Rise: 11 − 3 = 8; run: 6 − 2 = 4
  • Slope: 8 ÷ 4 = 2
  • y-intercept: 3 − 2 × 2 = −1, so the line is y = 2x − 1
  • Angle: arctan(2) = 63.4349°; grade: 200%

The slope is 2 and the line is y = 2x − 1, which crosses the y axis at −1. A slope of 2 is steep: 63.4349°, or a 200% grade. A ramp with a rise of 4 and a run of 12, by contrast, has a slope of 0.3333, about 18.43°.

Grade and angle

Grade, angle and rise per run
GradeAngleRises 1 unit in
1%0.57°100
2%1.15°50
5%2.86°20
8%4.57°12.5
10%5.71°10
20%11.31°5
50%26.57°2
100%45.00°1

A 100% grade is a 45 degree slope, not a vertical wall. Ramp and road rules are usually written as a grade or as "1 in" a number, so this table is handy for checking plans.

Common slips

  • Putting x on top. Slope is change in y over change in x, not the other way round.
  • Mixing the order of the points. If you start with y2 on top, start with x2 on the bottom.
  • Calling a vertical line slope 0. A horizontal line has slope 0; a vertical line has no slope at all.
  • For the equation of a line through one point with a known slope, the point-slope calculator is the better fit.

Frequently asked questions

How do I find the slope between two points?

Take the difference in y and divide it by the difference in x: m = (y2 − y1) ÷ (x2 − x1). For (1, 2) and (5, 10), that is 8 ÷ 4 = 2. Enter the two points above and the calculator shows the slope, the line equation, the angle and the grade.

What is the slope formula?

Slope is rise over run: m = (y2 − y1) ÷ (x2 − x1). It tells you how much y changes for each step of 1 in x. A positive slope rises from left to right, a negative one falls, 0 is flat, and a vertical line has an undefined slope.

How do I convert slope to an angle?

Take the arctangent of the slope. A slope of 1 is arctan(1) = 45°, and a slope of 0.5 is about 26.57°. The calculator shows the angle with every answer. To go back, take the tangent of the angle: tan(30°) is a slope of about 0.577.

What is the difference between slope and grade?

They measure the same thing in different ways. Slope is a plain ratio, like 0.05, while grade writes it as a percentage, 5%. Roads and ramps are usually given as a grade. Multiply the slope by 100 to get the grade.

Related calculators

See all free calculators

More free tools from CloveDesk

CloveDesk gives freelancers and small teams one place for quotes, e-signatures, invoices, files and a portal for each client.

Try CloveDesk free

Last updated: