Slope Calculator

Find the slope, line equation, y-intercept, and angle of incline from two points (with the formula and substitution shown).

Details

Your points

A
B

Slope

2

Equation of the liney = 2x
Where it crosses the y-axis0
Angle it climbs at63.4349°
Distance between the points2√5

This works out how steep a line is from two points. Enter the coordinates and it returns the slope as a number, along with the equation of the line in y = mx + b form.

It also gives the angle in degrees, the distance between the two points, and where the line crosses the y-axis, which covers both the algebra and the practical grade questions.

What is slope?

Slope is how steep a line is. It compares how far something rises against how far it runs along.

A slope of 2 means that for every 1 step forward you go 2 steps up. A slope of 0.5 means you climb half a step for every step forward, which is far gentler.

The same idea gets written three different ways depending on who is using it: as a plain number in maths, as degrees by anyone with a protractor, and as a percentage by builders, roofers and highway engineers. They all describe the same steepness.

Slope = rise ÷ run, from (3,4) to (6,8)
8 − 4rise: change in height
÷
6 − 3run: change across
=
4/3slope (m)

Always subtract in the same order on top and bottom. Take y₂ − y₁ on top, so the bottom must be x₂ − x₁, or the sign comes out backwards.

What to enter

Two points
The x and y of each point. Order does not matter as long as you keep each pair together.
Equation of the line
The result in y = mx + b form, where m is the slope and b is where the line crosses the y-axis.
Angle it climbs at
The same steepness in degrees. A slope of 1 is exactly 45°.
Distance between the points
The straight-line distance, worked out with the Pythagorean theorem.

What common percent grades actually feel like

1%
0.57°, or ⅛ inch of fall per foot. The minimum fall for a drain pipe run.
2%
1.15°, or ¼ inch per foot. The usual fall for patios and driveways so water runs off.
6%
3.43°. A steep motorway hill; the grade that gets a warning sign for lorries.
8.33%
4.76°, or exactly 1 inch of rise per foot. The 1:12 maximum for a wheelchair ramp.
100%
45°. Rise equals run. A 100% grade is not vertical, which surprises most people.

What this assumes

The line is straight. A curve has a different slope at every point, which is what calculus is for.

A vertical line has undefined slope, because the run is zero and you cannot divide by zero.

How to calculate slope

Subtract, subtract, divide. The only thing to be careful about is doing both subtractions the same way round.

m = (y₂ − y₁) ÷ (x₂ − x₁)
y₂ − y₁
The rise: how much the height changes
x₂ − x₁
The run: how far you travel across
m
The slope
  1. Find the rise. Subtract the first y from the second y.

  2. Find the run. Subtract the first x from the second x, taking the points in the same order as before.

  3. Divide. Rise divided by run gives the slope. Positive climbs left to right, negative falls.

  4. Convert if you need to. For a percentage, multiply the slope by 100. For degrees, take the inverse tangent.

See a worked example: the line through (3, 4) and (6, 8)
First point
(3, 4)
Second point
(6, 8)

Rise: 8 − 4 = 4.

Run: 6 − 3 = 3.

Slope: 4 ÷ 3 = 1.333.

As a percentage that is 133%, and as an angle it is 53.13°.

The straight-line distance between the points is 5, from the 3-4-5 triangle.

Slope = 4/3, or 53.13°

Frequently asked questions

Problems people actually run into

Confusing percent grade with degrees

A 10% grade is about 5.7°, not 10°. People read a road sign saying 10% and picture something far steeper than it is.

The two only agree near zero. By 45° the grade is already 100%, and beyond that the percentage runs off towards infinity while the angle creeps towards 90°.

Subtracting the points in different orders

Taking y₂ − y₁ on top but x₁ − x₂ underneath flips the sign, turning an uphill line into a downhill one.

Pick a point to call 'first' and use it first in both subtractions. If your answer has the wrong sign, this is nearly always why.

Results are estimates for general information only and are not professional financial, medical, or legal advice. Read our full disclaimer.

Sources

Last updated: September 3, 2026