We calculate the gradient by choosing two points on the line and calculating the change in the y axis (up/down) and the change in the x axis (across).