How to use the slope calculator
- Type the first point as x₁ and y₁.
- Type the second point as x₂ and y₂.
- Read Slope (m) and the Equation of the line.
- Check the extra results: y-intercept (b), Angle of inclination, x-intercept and Perpendicular slope. The Working box shows how m and b were found.
What it does and when to use it
Slope measures steepness: how much y changes for each step in x. It answers questions such as “how fast does the cost rise per item?” or “how steep is this ramp?”. In algebra classes you often need the equation of a line through two given points; this tool writes it out, so you can check your answer.
For distance and midpoint as well, use coordinate line properties. If you only need the midpoint or the distance, those tools show their own working.
How it works
- Slope: m = (y₂ − y₁)/(x₂ − x₁), rise over run.
- Intercept: put one point into y = mx + b and solve, b = y₁ − m·x₁.
- x-intercept: where y = 0, x = −b/m (not shown for a horizontal line).
- Angle of inclination: arctan(m), in degrees.
- Perpendicular slope: −1/m.
If x₁ = x₂ the tool reports a vertical line, x = x₁. If the two points are identical it says the slope is undefined, because any line passes through a single point.
Worked examples
Step by step. Points (2, 5) and (6, 13).
- Rise: 13 − 5 = 8. Run: 6 − 2 = 4.
- Slope: m = 8 ÷ 4 = 2.
- Intercept: b = 5 − 2 × 2 = 1.
- Write the line: y = 2x + 1.
The tool shows Equation: y = 2x + 1, an angle of inclination of 63.434949°, x-intercept −0.5 and perpendicular slope −0.5.
A falling line. Points (−1, 4) and (3, 2) give m = −2/4 = −0.5 and y = −0.5x + 3.5. The line crosses the x-axis at x-intercept: 7, and a perpendicular line would have slope 2.
A flat line. Points (1, 3) and (5, 3) give slope 0 and the equation y = 3. The tool reports Perpendicular slope: undefined (vertical), because a line at right angles to a flat line is vertical.
Limits and tips
- Slopes appear as decimals (up to 10 significant figures), so 1/3 shows as 0.3333333333. Turn it back into a fraction with decimal to fraction if your teacher wants y = (1/3)x + 2.
- The tool needs two points. It does not take a slope and one point, or an equation, as input.
- Runs entirely in your browser.
Frequently asked questions
What does a negative slope mean?
Why is the slope "undefined" for some lines?
What is the perpendicular slope used for?
What is the angle of inclination?
Is "slope" the same as "gradient"?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.