How to find the slope
m = (y₂ − y₁) ÷ (x₂ − x₁) y = mx + b, where b = y₁ − m × x₁Take the two points (1, 2) and (3, 6). Rise = 6 − 2 = 4 and run = 3 − 1 = 2, so m = 2. The intercept is b = 2 − 2 × 1 = 0, so the line is y = 2x. The angle with the x-axis is arctan(2) = 63.43°. Swapping the order of the points gives the same slope.
Reading the slope
| Slope | The line |
|---|---|
| Positive | Rises from left to right |
| Negative | Falls from left to right |
| Zero | Horizontal |
| Undefined | Vertical (run is 0) |
Parallel lines have equal slopes, and perpendicular lines have slopes that multiply to −1. Roads and roofs use percent grade, which is slope × 100: a slope of 0.08 is an 8% grade.
Uses of slope
- Rate of change in graphs: speed from a distance-time graph, or cost per unit.
- Road gradients, wheelchair ramps, roofs and drainage.
- Finding trend lines in data.
See also the distance calculator, the Pythagorean theorem calculator and the quadratic formula calculator.
Complete guide to the Slope Calculator
How to use the Slope Calculator, step by step
- Enter the two points.
- Read the slope and line equation.
- Check the angle and intercepts.
- Use the distance and midpoint if needed.
Common mistakes to avoid
- Subtracting in a different order on top and bottom.
- Mixing up x and y.
- Forgetting a vertical line has no slope.
Key terms explained
- Rise
- The change in y.
- Run
- The change in x.
- Intercept
- Where a line crosses an axis.
- Grade
- Slope expressed as a percentage.
Want the full walkthrough? Read our guide: How Slope and Distance Work (Rise Over Run and the Distance Formula).
Frequently asked questions
What is the slope formula?
The slope between two points is (y₂ − y₁) ÷ (x₂ − x₁), the change in y divided by the change in x, also called rise over run.
What does an undefined slope mean?
The two points have the same x value, so the line is vertical and the run is zero. Division by zero is undefined.
How do I find the equation of a line?
Work out the slope m, then use y = mx + b with b = y₁ − m × x₁. The result is the slope-intercept form.
How do I convert slope to degrees?
The angle is the inverse tangent of the slope: angle = arctan(m). A slope of 1 is 45°, and a slope of 0 is 0°.
What is the slope of perpendicular lines?
It is the negative reciprocal. If one line has slope 2, a line perpendicular to it has slope −1/2.
What is percent grade?
Percent grade is slope × 100. A road that rises 6 metres over 100 metres of horizontal distance has a 6% grade.
How is slope used in real life?
Slope describes steepness and rates of change: the gradient of a road, the pitch of a roof, speed on a distance graph, or the cost of each extra unit in a price line.