Slope Calculator

The slope of a line measures how steep it is: the rise in y for each step in x. With two points you also get the full equation of the line.

Results update as you type.

Slope (m)

2

rise 6 over run 3

Equation
y = 2x
Angle with the x-axis
63.43494882°
x-intercept
0

About this calculator

A vertical line has an undefined slope.

How to use it

  1. Enter the first point.
  2. Enter the second point.
  3. Read the slope and equation.

The formula

m = (y₂ − y₁) ÷ (x₂ − x₁); c = y₁ − m x₁
m
slope
c
y-intercept

Worked example

Points (1, 2) and (4, 8)

  1. m = (8 − 2) ÷ (4 − 1) = 2.
  2. c = 2 − 2 × 1 = 0, so y = 2x.
  3. Angle with the x-axis ≈ 63.43°.

What the result means

Parallel lines have equal slopes; perpendicular slopes multiply to −1.

Assumptions

  • All lengths in the same unit.

Limitations

  • Results are rounded to 10 significant figures.

Frequently asked questions

What is slope?

Rise over run: the change in y divided by the change in x.

What is the slope of a horizontal line?

0.

What is a negative slope?

The line falls from left to right.

Last reviewed on 3 October 2026. Found a mistake? Tell us.