Slope Calculator

Find the slope of a line from two points, with the angle of incline, the y-intercept, and the line’s equation. Calculates in your browser.

Slope (m)

-

Angle of incline-
y-intercept (b)-
Line equation-

Show the math

Slope is the change in y over the change in x, rise over run:

m = (y₂ − y₁) ÷ (x₂ − x₁)

A vertical line (no change in x) has an undefined slope and no y = mx + b equation. All math runs locally in your browser.

What this does

The slope calculator finds the slope (gradient) of the straight line through two points, along with the angle of incline, the y-intercept, and the equation of the line in y = mx + b form.

How to use it

  1. Enter the coordinates of the first point (x₁, y₁).
  2. Enter the coordinates of the second point (x₂, y₂).
  3. Read the slope, angle, intercept, and line equation.

How it works

Slope is the change in y divided by the change in x, rise over run. A vertical line (no change in x) has an undefined slope.

m = (y₂ − y₁) ÷ (x₂ − x₁)

Understanding your result

A positive slope rises left to right, a negative slope falls, and a slope of zero is a flat horizontal line. The bigger the absolute value, the steeper the line. When the two points share an x-value the line is vertical, so the slope is undefined and there is no y = mx + b equation.

Example

From (1, 2) to (4, 6) the slope is 4⁄3 ≈ 1.33, an incline of about 53°.

Sources & methodology

Last updated .

Frequently asked questions

What is slope?

Slope is the steepness of a line, the change in y divided by the change in x (rise over run). It is written m in the line equation y = mx + b.

Why is a vertical line’s slope undefined?

A vertical line has no change in x, so the slope formula would divide by zero. Such a line has no slope and no y = mx + b equation.

What does a negative slope mean?

The line falls as you move from left to right. A positive slope rises, and a slope of zero is perfectly horizontal.

Is my data stored?

No. Everything is calculated locally in your browser.