FreeToolsBox

Slope Calculator

This slope calculator finds the slope of a line from two points, or from a rise and run you already know. It reports the result four ways — decimal, percent, angle in degrees and ratio — and reports a vertical line honestly as undefined instead of a made-up number.

Free to use No sign-up Runs in your browserMethodology & correctionsImportant limitations

Slope Calculator

Free

Workbench · No. 1020

Try Slope Calculator

Guide

How to use Slope Calculator

Start with the working tool above. The notes below explain the inputs, method, limitations and checks that matter for this specific task.

  1. 1. Choose a mode: Two Points if you have coordinates, or Rise & Run if you measured a vertical change and a horizontal distance.
  2. 2. In Two Points mode, enter x1, y1 for the first point and x2, y2 for the second point.
  3. 3. In Rise & Run mode, enter the vertical rise and the horizontal run in the same unit.
  4. 4. Read the slope as a decimal, a percent, an angle in degrees and a rise-to-run ratio.
  5. 5. Use Reset to clear the fields, or change a value and recalculate to compare.

How it works

Slope measures steepness: slope = rise ÷ run. For two points, m = (y2 − y1) ÷ (x2 − x1), where (x1, y1) and (x2, y2) are the two points, rise is the vertical change (y2 − y1) and run the horizontal change (x2 − x1). From that decimal: percent = m × 100, angle = arctan(m) in degrees, and ratio = rise : run in 1-based form such as 1:2. When the run is zero the line is vertical and the slope is undefined.

Worked examples

Two points: (0, 0) to (10, 5)

Rise = 5 − 0 = 5. Run = 10 − 0 = 10. Slope = 5 ÷ 10 = 0.5. As a percent: 0.5 × 100 = 50%. Angle: arctan(0.5) ≈ 26.57°. Ratio 1:2 — the line climbs 1 unit per 2 across.

Two points: (2, 3) to (6, 11)

Rise = 11 − 3 = 8. Run = 6 − 2 = 4. Slope = 8 ÷ 4 = 2. That is 2 × 100 = 200% as a percent, and arctan(2) ≈ 63.43° — a steep line that rises twice as fast as it runs.

Rise & Run mode: a garden path

A path climbs 3 ft over 12 ft horizontally. Slope = 3 ÷ 12 = 0.25, which is 25% or about 14.04° — a gentle grade most people walk comfortably.

When this tool is useful

  • Checking a driveway, path or garden grade before building
  • Ramp steepness for sheds, decks and access routes
  • Math homework on the slope of a line through two points
  • Converting percent grade to degrees for road and trail work
  • Comparing the steepness of two lines, roofs or embankments

The four types of slope

Every straight line has one of four slope types: positive (climbs), negative (falls), zero (flat) or undefined (vertical). The type alone tells you how the line behaves before you check the number.

  • Positive slope — the line rises; example: m = 2 climbing through (2, 3) and (6, 11).
  • Negative slope — the line falls; example: a hillside dropping 1 ft for every 4 ft across is m = −0.25.
  • Zero slope — the line is horizontal; the rise is 0, so m = 0 ÷ run = 0.
  • Undefined slope — the line is vertical; the run is 0, so the division cannot be done.

Slope formats compared: decimal, percent, degrees and ratio

Different trades quote the same steepness differently. This table converts four common values between decimal, percent, angle and ratio.

Slope (decimal)PercentAngleRatio (rise:run)
0.2525%14.04°1:4
0.550%26.57°1:2
1100%45°1:1
2200%63.43°2:1

Common mistakes to avoid

  • Swapping rise and run: slope is vertical change divided by horizontal change, never the other way round.
  • Mixing units, such as a rise in inches with a run in feet — convert both to the same unit first.
  • Reading a 100% slope as vertical. 100% means rise equals run, which is a 45° angle; vertical is undefined.
  • Forgetting that a falling line has a negative slope.
  • Assuming percent and degrees are interchangeable — 26.57° and 50% are the same slope, but the numbers are not equal.

Frequently asked questions

How do you calculate slope from two points?

Subtract the y values for the rise and the x values for the run, then divide: m = (y2 − y1) ÷ (x2 − x1). For (2, 3) and (6, 11): (11 − 3) ÷ (6 − 2) = 8 ÷ 4 = 2.

What is the difference between slope, percent and degrees?

They describe the same steepness. A slope of 0.5 is a 50% grade and a 26.57° angle. Percent suits roads and drainage, degrees suit geometry, and the decimal suits equations.

What does an undefined slope mean?

The line is perfectly vertical, so the run is zero and division by zero is impossible. The calculator reports “Undefined — vertical line” rather than an error or a fake number.

Can slope be negative?

Yes. Negative means the line falls left to right, like a downhill road; zero means perfectly flat and horizontal.

Is a 100% slope a vertical wall?

No. A 100% slope means rise equals run — a 45° angle. Percent can exceed 100% (a slope of 2 is 200%), while a truly vertical surface has no defined slope.

What slope is too steep for a driveway?

Most guidance treats roughly 15–20% as the practical upper range for a residential driveway, depending on surface and climate. Check your local building code before relying on any single number.

Bottom line

Checking a yard grade or finishing a geometry problem, slope is always rise divided by run. Use the four formats interchangeably, and treat a vertical result as undefined, not a number.

If the question changes shape, the closest neighbours are Math Equation Solver and Ratio Calculator — or browse everything under Math Calculators.

Similar Math tools

See all Math Calculators tools

Related guides