Slope Calculator
Enter two points to get the slope, y-intercept, angle of inclination and the line's equation in y = mx + b form.
Reviewed by the OmniCalc teamMethod verified 2026-07-01
Point 1
Point 2
2
Slope (m) 2, Equation y = 2x + 1- Y-intercept (b)
- 1
- Angle
- 63.4349°
- Equation
- y = 2x + 1
- Slope (m)
- 2
Show steps
- Slope m = (y₂ − y₁) ÷ (x₂ − x₁) = (9 − 3) ÷ (4 − 1) = 6 ÷ 3 = 2.
- Y-intercept b = y₁ − m·x₁ = 3 − 2·1 = 1.
- Angle = arctan(m) = arctan(2) = 63.4349488229°.
- Equation: y = 2x + 1.
How to use the slope calculator
- 1Enter the coordinates of the first point (x₁, y₁) and the second point (x₂, y₂).
- 2Read the slope m, the y-intercept b, the angle and the full equation y = mx + b.
- 3Expand Show steps to see the substitution worked through.
Worked example
For the points (1, 3) and (4, 9): m = (9 − 3) ÷ (4 − 1) = 6 ÷ 3 = 2, then b = 3 − 2·1 = 1, giving y = 2x + 1 at an angle of about 63.4°.
Frequently asked questions
What is the slope formula?
Slope is the change in y over the change in x between two points: m = (y₂ − y₁) ÷ (x₂ − x₁). A positive slope rises from left to right, a negative slope falls.
What does an undefined slope mean?
When the two points share the same x-value the line is vertical and Δx = 0, so the slope is undefined — you cannot divide by zero. Its equation is x = a constant, and it stands at a 90° angle.
How do I find the equation of the line?
Compute the slope m, then the y-intercept b = y₁ − m·x₁, and write it in slope-intercept form y = m·x + b. This calculator returns all three and shows the working.