The formula
m = (y₂ − y₁) ÷ (x₂ − x₁)
Why it works
Slope is rise over run: how much the line climbs for each unit it travels sideways. It is the same quantity whichever pair of points on the line you pick, which is exactly what makes a line a line.
How to solve it by hand
- Subtract the y values: rise = y₂ − y₁
- Subtract the x values: run = x₂ − x₁
- Divide the rise by the run
- For the angle, take the arctangent of the slope
What is worth knowing
Three ways of expressing the same thing cause endless confusion. A slope of 1 is 100 % and 45°, not 90°: the percentage is the tangent of the angle times a hundred, so it grows without limit while the angle tops out. A vertical line has no slope at all, since the run is zero and the division is undefined — 'infinite slope' is loose talk, not a value. Road gradient signs use the percentage, roofs are often quoted as a ratio, and mathematics uses the plain number. Converting between them is the arctangent, not a proportion.