Skip to content

Slope Calculator

Type two points, or drag them on the grid…

Type two points, or drag them on the grid, to get the slope as a fraction and a decimal, the equation of the line through them and its angle.

Point 1
Point 2

ExampleSlope (m)

3/4

That is 0.75: up 3 for every 4 across. The line is y = (3/4)x + 5/4.

Type your own points, or drag them.

Drag either point; it snaps to the grid every half unit.

Line
y = (3/4)x + 5/4
Angle with the x-axis
36.87°
Perpendicular slope
−4/3
How this works: 5 sources,

How this works

Method

Slope measures steepness as rise over run: how far a line goes up for each step to the right. Between (x₁, y₁) and (x₂, y₂) it is m = (y₂ − y₁) ÷ (x₂ − x₁). From (−2, 1) to (4, 4) the rise is 3 and the run is 6, so the slope is 3/6 = 1/2: up one for every two across. Full method

How it’s tested

2 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.

Privacy

On your device. Nothing you enter or open leaves this browser. About privacy labels

Changes

  • First published: 13 shapes drawn to scale with handles, exact answers in π, litres and gallons, and slope, distance, midpoint, arc and polygon pages.

Every change on What’s new

How we make toolsReport a mistake

How to find the slope between two points

Slope measures steepness as rise over run: how far a line goes up for each step to the right. Between (x₁, y₁) and (x₂, y₂) it is m = (y₂ − y₁) ÷ (x₂ − x₁). From (−2, 1) to (4, 4) the rise is 3 and the run is 6, so the slope is 3/6 = 1/2: up one for every two across.

With the slope, the equation of the line follows from y = mx + b: put in one point and solve for b. Here 1 = ½ × (−2) + b gives b = 2, so the line is y = (1/2)x + 2. A positive slope climbs to the right, a negative one falls, 0 is flat and a vertical line has no slope at all, because the run is 0.

In everyday life slope is often a percentage or a ratio. A road grade of 8% rises 8 m for every 100 m, a slope of 0.08. US accessibility rules limit a wheelchair ramp to 1:12, one unit of rise for every 12 of run: a slope of about 0.083, or 8.3%, at an angle of about 4.8°.

m = (y₂ − y₁) ÷ (x₂ − x₁) · y = mx + b · angle = arctan(m)

Slopes as ratios, grades and angles

The same steepness written as rise : run, a slope, a percent grade and an angle from the horizontal.

The same steepness written as rise : run, a slope, a percent grade and an angle from the horizontal.
Rise : runSlopeGradeAngle
1 : 201/20 = 0.055%2.86°
1 : 121/12 ≈ 0.0838.3%4.76°
1 : 101/10 = 0.110%5.71°
1 : 81/8 = 0.12512.5%7.13°
1 : 51/5 = 0.220%11.31°
1 : 41/4 = 0.2525%14.04°
1 : 31/3 ≈ 0.33333.3%18.43°
1 : 21/2 = 0.550%26.57°
3 : 43/4 = 0.7575%36.87°
1 : 11100%45°
Show all 14 rows
4 : 34/3 ≈ 1.333133.3%53.13°
2 : 12200%63.43°
3 : 13300%71.57°
10 : 1101000%84.29°

Common questions

Does it matter which point is first?

No. Swapping the points flips the sign of both the rise and the run, and the two signs cancel: (4 − 1) ÷ (4 − (−2)) and (1 − 4) ÷ (−2 − 4) are both 1/2.

What is the slope of a vertical line?

It is undefined. The run is 0 and you can’t divide by 0. The line’s equation is x = a number instead of y = mx + b.

How do I turn a slope into an angle?

Take the arctangent: a slope of 1 is arctan(1) = 45°, a slope of 1/2 about 26.57°. A 100% grade is 45°, not vertical.