About the Slope Calculator
Find the slope (gradient) of a line through two points, its angle of inclination, and the line equation y = mx + b.
Also known as: slope formula, gradient calculator, rise over run, slope of a line, find slope from two points, slope intercept form.
How to use this calculator
- Enter x₁, y₁, x₂, y₂.
- The result updates instantly as you type — press Calculate (or Enter) at any time.
- Open “Step-by-step” to see how the answer was worked out.
- Use Copy result or Share to save the answer or send a link with your inputs.
Formula
m = (y₂ − y₁) / (x₂ − x₁)
Worked example
Using the values pre-filled in the calculator above:
- x₁ = 1
- y₁ = 2
- x₂ = 4
- y₂ = 11
the calculator returns:
- Slope m: 3
- Equation: y = 3x − 1
- y-intercept: -1
- Angle of inclination: 71.565051 °
Working
m = (11 − 2) ÷ (4 − 1) = 9 ÷ 3 = 3b = 2 − 3 × 1 = -1