Skip to content

Slope Calculator

Calculate the slope of a line from two points. See the slope, equation of the line, angle, graph, and step-by-step solution instantly.

Two points

m = (y₂ - y₁) / (x₂ - x₁)

Point 1
Point 2

Try an example

x [-10, 10]

Drag to pan · scroll or pinch to zoom · keyboard: arrows pan, + / - zoom, 0 reset

Slope

2

Line equation

y = 2x

Slope type

Positive

Angle of inclination

63.43°

Calculation steps

  1. Step 1: Identify the points
    P₁ = (1, 2), P₂ = (4, 8)
  2. Step 2: Apply the slope formula
    m = (y₂ - y₁) / (x₂ - x₁)
  3. Step 3: Substitute the coordinates
    m = (8 - 2) / (4 - 1)
    m = 6/3
    m = 2
  4. Final result: The slope is 2.

Equation of the line

Slope-intercept form
y = 2x
Point-slope form
y - 2 = 2(x - 1)

Additional properties

Rise
6
Run
3
Slope fraction
2
Slope decimal
2
Distance between points
6.7082
Angle of inclination
63.43°

What does this slope mean?

The line rises 2 units for every 1 unit moved to the right.

What is slope?

Slope measures how steep a line is: how much y changes for each unit of x. If you have two points and need the steepness, the equation, or the angle between them, enter the coordinates and read every value with its working shown.

How to calculate slope

m = rise / run = (y₂ - y₁) / (x₂ - x₁)

  1. Subtract the first y-coordinate from the second to find the rise.
  2. Subtract the first x-coordinate from the second to find the run.
  3. Divide the rise by the run, provided the run is not zero.

Slope FAQ

What is the slope of a line?

The slope measures how steep a line is and how much y changes for each unit change in x.

How do you calculate slope from two points?

Subtract the y-coordinates to find the rise, subtract the x-coordinates to find the run, and divide the rise by the run when it is nonzero.

Can a slope be negative?

Yes. A negative slope means the line falls from left to right.

What is the slope of a vertical line?

It is undefined because the x-coordinate does not change and the run is zero.

What is the slope of a horizontal line?

It is zero because the y-coordinate remains constant.