This free online slope calculator finds the slope and equation of the line passing through two points. Enter the coordinates of both points to instantly get the slope (rise over run) and the line's equation in y = mx + b form.
How to Use the Slope Calculator
Enter the coordinates of the first point in the "x1" and "y1" fields.
Enter the coordinates of the second point in the "x2" and "y2" fields.
Click "Calculate" to compute the slope and line equation.
Review the "Slope" and "Line Equation" shown in the result box.
Frequently Asked Questions
The calculator uses the slope formula m = (y2 - y1) / (x2 - x1), then finds the y-intercept b = y1 - m·x1 to write the full line equation y = mx + b.
When x1 equals x2, the line is vertical and the slope is undefined. The calculator detects this and shows "Undefined (vertical line)" along with the equation x = [x-value] instead of a numeric slope.
For points (1, 2) and (4, 6), the slope is (6-2)/(4-1) = 4/3 ≈ 1.333, and the y-intercept is 2 - 1.333×1 ≈ 0.667, giving the equation y = 1.333x + 0.667.
Yes, it's completely free, requires no sign-up, and rounds the slope and intercept to three decimal places.