Slope Calculator

Find the slope, y-intercept and equation of the line through two points.

Slope (m)
y-intercept (b)
Line equation
Angle of incline
Distance between points

Results update as you type.

About this calculator

The slope of a line measures its steepness — the rise over the run between two points. This calculator computes the slope m = (y₂ − y₁) / (x₂ − x₁), the y-intercept, and the equation of the line in slope-intercept form y = mx + b. A vertical line has an undefined slope.

Frequently asked questions

How do you calculate slope from two points?

Slope = (y₂ − y₁) / (x₂ − x₁), the change in y divided by the change in x. From (0,0) to (3,6) the slope is 6/3 = 2.

Why is a vertical line’s slope undefined?

A vertical line has no change in x, so the slope formula divides by zero. Its equation is x = constant instead of y = mx + b.

Results are estimates for general guidance only, not financial, medical or tax advice.