text: what is the equation for working out the gradient of a line if i know two points on the line?   you have two points: (x1, y1) and (x2, y2). by convention, we assume the second point is on the right (in the positive x direction).   calculate (y2-y1)/(x2-x1). this will be the slope of the line. (you can remember this as "rise over run; rise is higher": above the line in the division).