Write down two points
For points (x₁, y₁) and (x₂, y₂), slope m = (y₂ − y₁) ÷ (x₂ − x₁). Use the same point order in the numerator and denominator.
Try a calculation
Between (2, 3) and (6, 11), the rise is 11 − 3 = 8 and the run is 6 − 2 = 4. The slope is 8 ÷ 4 = 2.
Handle the special cases
A horizontal line has a zero change in y and therefore slope 0. A vertical line has a zero change in x; its slope is undefined because you cannot divide by zero.