Slope Calculator
Find slope, y-intercept, and line equation from two points
Find slope, y-intercept, and line equation from two points
Enter the coordinates of two points, and this calculator finds the slope of the line between them, along with the line's full equation in slope-intercept form (y = mx + b).
Slope (m) = (y₂ − y₁) / (x₂ − x₁) — the change in y (rise) divided by the change in x (run) between two points.
Once the slope is known, the y-intercept (b) can be found by substituting either point into y = mx + b and solving for b, giving the complete equation of the line.
A positive slope means the line rises from left to right; a negative slope means it falls. A slope of zero is a horizontal line, and a vertical line (where x₁ equals x₂) has an undefined slope, since division by zero is not possible.
A negative slope means the line falls as you move from left to right — y decreases as x increases.
Slope is calculated as change in y divided by change in x. On a vertical line, x never changes, which means the calculation involves dividing by zero — an operation that has no defined result.
First calculate the slope using the slope formula, then substitute the slope and one of the points into y = mx + b and solve for b (the y-intercept). Together, m and b give the full equation of the line.