If you have two points (x1,y1) and (x2,y2), the slope m is (y2 - y1) / (x2 - x1). It's the change in the y's divided by the change in the x's.
.
Example: A line is formed by two points (1,2) and (3,4). What is the slope of the line?
m = (y2 - y1) / (x2 - x1)
m = (4 - 2) / (3 - 1)
m = 2 / 2
m = 1
.
Note: It doesn't matter which point you pick for (x1,y1) and (x2,y2).
Here's the same example, but with the points reversed:
m = (y2 - y1) / (x2 - x1)
m = (2 - 4) / (1 - 3)
m = -2 / -2
m = 1
(same answer)