Slope Calculator
Enter the coordinates of two points to calculate the slope of the line between them, using m = (y2 − y1) / (x2 − x1).
Last updated: September 5, 2026
Frequently asked questions
What's the formula for slope?
m = (y2 − y1) / (x2 − x1) - the change in y divided by the change in x between two points. A slope of 2 means y increases by 2 for every 1 unit increase in x.
What does a negative slope mean?
A negative slope means the line goes downward from left to right - as x increases, y decreases. A positive slope goes upward left to right, a zero slope is a flat horizontal line, and an undefined slope is a vertical line.
How do I calculate slope from a graph without exact coordinates?
Pick any two points the line clearly passes through on the grid, read off their (x, y) coordinates, then apply the slope formula. Choosing points that land on clean grid intersections makes the rise-over-run count easier and less error-prone than estimating decimal coordinates.
How do you find slope?
Pick any two points on the line, subtract their y-coordinates and their x-coordinates, then divide: slope = (y2 − y1) / (x2 − x1). Enter your two points above and this calculator does that division for you, along with the line's full equation.
What does an 'undefined slope' mean and when does it happen?
Slope is undefined when the two points share the same x-coordinate (a vertical line), because the slope formula's denominator (x2 − x1) becomes zero, and division by zero has no defined result.
How do I convert a slope value into an angle?
Take the inverse tangent (arctan) of the slope: angle = arctan(m). A slope of 1 corresponds to a 45° angle, since tan(45°) = 1.
What's the slope between (1,2) and (4,8)?
2 - m = (8-2)/(4-1) = 6/3 = 2, meaning y increases by 2 units for every 1 unit increase in x.