The gradient is 1/4 or 0.25
The explanation is below, you basically need to count the squares across and then upwards until you make a triangle with whole numbers. Then divide the amount of squares upwards by the squares across
But it is important to note that if the line faces the opposite direction it is different
Hope this helps :)