Slope Calculator

Enter two points to find the slope, the line's equation, the distance between them, the midpoint, and the angle of inclination.

Two Points

How to Find the Slope of a Line

The slope of a line through two points (x1, y1) and (x2, y2) is the "rise over run": m = (y2 − y1) / (x2 − x1). A positive slope rises from left to right, a negative slope falls, a slope of zero is a flat horizontal line, and a vertical line has an undefined slope because the change in x is zero.

Once you have the slope, you can write the line's equation in slope-intercept form (y = mx + b, solving for the y-intercept b), or in standard form (Ax + By = C), which also correctly represents vertical lines that slope-intercept form cannot.

Frequently Asked Questions

How do you find the slope between two points?+

Slope (m) equals the change in y divided by the change in x: m = (y2 − y1) / (x2 − x1). It measures how steep a line is and in which direction it moves.

What does a negative, positive, zero or undefined slope mean?+

A positive slope rises left to right, a negative slope falls left to right, a zero slope is a perfectly horizontal line, and an undefined slope is a perfectly vertical line (since dividing by a zero change in x is impossible).

How do you write the equation of a line from two points?+

First find the slope, then use one point with the point-slope form y − y1 = m(x − x1), and simplify into slope-intercept form (y = mx + b) or standard form (Ax + By = C).

What is the difference between slope-intercept form and standard form?+

Slope-intercept form (y = mx + b) directly shows the slope and y-intercept, which is handy for graphing. Standard form (Ax + By = C) is often preferred in algebra for solving systems of equations and handles vertical lines, which slope-intercept form cannot represent.

How do you find the distance between two points?+

Use the distance formula, which comes from the Pythagorean theorem: d = √[(x2 − x1)² + (y2 − y1)²].