You have two coordinates, (x1, y1) and (x2, y2).
dy/dx = (y2 - y1)/(x2 - x1)
= -(y2 - y1)/-(x2 - x1) [times top and bottom by -1/-1]
= (y1 - y2)/(x1 - x2)
i.e. dy/dx = (y2 - y1)/(x2 - x1) = (y1 - y2)/(x1 - x2)
What does this tell us? It doesn't matter which coordinate we pick as our x1/2, y1/2 as long as we keep consistent.
Just try out the formula (your one appears to be incorrect), and you'll notice that the gradient is automatically negative.