honestly, i searched this up but google can explain it a lot better than i can :(
1. choose any two points on the line.
2.draw a right-angled triangle with the line as hypotenuse.
3. use the scale on each axis to find the triangle's: vertical length.
4. horizontal length.work out the vertical length ÷ horizontal length.
5. the result is the gradient of the line.