Saved

Press the star next to a tool's name to save it.

All my tools

Slope Calculator

Enter two points, or the rise and run, to see the slope as a percentage, a number and an angle.

Restored your last values ·

Use the same unit for every value. Your result opens on the next page.

Slope percentage

50%

Enter your numbers to see the slope.

See full result

Slope formula

Slope measures how steep a line is. It’s the rise, or vertical change, divided by the run, or horizontal change.

Slope = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁)

Slope percentage = slope × 100

Angle = arctan(slope)

Worked examples

From two points: for (1, 2) and (5, 4), the rise is 4 − 2 = 2 and the run is 5 − 1 = 4. The slope is 2 ÷ 4 = 0.5, which is 50%, or an angle of about 26.57°. The line’s equation is y = 0.5x + 1.5.

From rise and run: a ramp that rises 1 foot over 12 feet has a slope of 1 ÷ 12 = 0.0833, which is 8.33%, or about 4.76°.

Common slopes

RatioPercentAngle
1:205%2.86°
1:128.33%4.76°
1:1010%5.71°
1:812.5%7.13°
1:425%14.04°
1:250%26.57°
1:1100%45°

A 100% slope isn’t vertical

A 100% slope means the rise equals the run, which is a 45° angle. A vertical line has no run, so its slope is undefined, and this calculator shows a message instead. Use the same unit for rise and run, such as feet for both.

How to use the slope calculator

  1. Choose what you know. Under “What do you know?”, pick Two points if you have coordinates, or Rise and run if you measured a height and a horizontal distance.
  2. Enter the values. For two points, fill in First point x, First point y, Second point x and Second point y. For rise and run, fill in Rise and Run. Use the same unit for every value.
  3. Press Calculate slope. Your result opens on the next page.
  4. Read the result. The big figure is the slope as a percentage. A line under it shows the division, rise ÷ run = slope. The table lists the slope as a plain number, the angle in degrees, the rise, the run and the ratio. With two points you also get the equation of the line.

The slope and the equation are shown to four decimal places, and the percentage, angle and ratio to two.

Worked example: a line that goes down

Take the points (−2, 7) and (4, −5). Enter −2 and 7 as the first point and 4 and −5 as the second.

  • Rise: −5 − 7 = −12
  • Run: 4 − (−2) = 6
  • Slope: −12 ÷ 6 = −2, shown as −200%
  • Angle: about −63.43°
  • Ratio: 1:0.5, which means 1 unit of fall for every half unit across
  • Equation of the line: y = −2x + 3

The negative sign tells you the line falls as you move to the right. The angle is negative for the same reason. The ratio ignores the sign and only describes how steep the line is.

Worked example: a sloping driveway

A driveway climbs 3 feet over a horizontal distance of 40 feet. Choose Rise and run, enter 3 for Rise and 40 for Run, and press Calculate slope. The slope is 3 ÷ 40 = 0.075, which is 7.5%, an angle of about 4.29° and a ratio of 1:13.33. In plain terms, the drive rises 1 foot for every 13.33 feet you walk across.

Measure the run on the level, not along the surface. If you run a tape along the slope itself, you get a slightly longer figure and a slightly smaller slope. The Pythagorean theorem calculator turns a sloped length and a rise into the true run.

Percent, ratio and degrees: reading each one

The three answers describe the same steepness in different ways:

  • Percent is the rise for every 100 units of run. A 7.5% grade rises 7.5 feet per 100 feet.
  • Ratio is written as 1:x, meaning 1 unit of rise for every x units of run. Builders and ramp guides often use this form.
  • Degrees is the angle between the line and the horizontal, found with the arctangent of the slope.

Percent and degrees don’t grow at the same pace. A 50% slope is about 26.57°, not 22.5°, and 100% is 45°. Very steep slopes climb past 100%: a rise of 12 over a run of 1 is 1,200%, or about 85.24°. A road that climbs 100 feet in a mile of 5,280 feet has a grade of about 1.89%, which is only about 1.09°. To switch between degrees and other angle units, use the angle converter.

How the equation of the line is found

In Two points mode, the calculator also writes the line in slope-intercept form, y = mx + b. The slope m comes from the rise and run. The intercept b is where the line crosses the y-axis, found as b = y₁ − m × x₁.

For the points (2, 3) and (8, 5), the rise is 2 and the run is 6, so the slope is 0.3333, or 33.33%, about 18.43°, with a ratio of 1:3. The intercept is 3 − 0.3333 × 2, so the equation shows as y = 0.3333x + 2.3333. Those decimals are rounded: the exact slope is one third. For more forms of the equation, such as point-slope or standard form, try the line equation calculator.

A flat line has a rise of 0, so its slope is 0%, its angle is 0° and the ratio row is left out, because 1:x has no meaning when nothing rises.

Common slope mistakes

  • Mixing up the points. Keep each x with its own y. Swapping both points gives the same slope, but swapping only the x values flips the sign.
  • Mixing units. A rise in inches and a run in feet gives a slope 12 times too big. Convert both to the same unit first.
  • Reading percent as degrees. A 10% grade is not 10°. It is about 5.71°.
  • Using a vertical line. If both x values are the same, the run is 0 and the slope is undefined. The calculator shows a message instead.

For roofs, the roof pitch calculator works in rise per 12 inches. For steps, the stair calculator handles rise and run per tread.

What next

Use this often? Add Slope to your Home screen.

Frequently asked questions

How do I calculate slope as a percentage?

Divide the rise by the run, then multiply by 100. A rise of 2 over a run of 4 is 2 ÷ 4 × 100 = 50%.

How do I convert slope percentage to degrees?

Divide the percentage by 100, then take the arctangent. A 10% slope is arctan(0.1), which is about 5.71°.

What does a negative slope mean?

The line goes down as you move from left to right.

What is the slope of a vertical line?

It’s undefined, because the run is 0 and you can’t divide by 0.

Does it matter which point I enter first?

No, as long as each x stays with its own y. Entering (4, −5) first and (−2, 7) second gives the same slope of −2, because the rise and the run both change sign.

What is the slope of a horizontal line?

Zero. The rise is 0, so the slope is 0, which is 0% and an angle of 0°.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools