First, you should calculate the square footage of the fence.6ft∗300ft=1800ft2 Then to find the number of gallons of paint needed, divide the area of the fence by the area covered with each gallon of paint: 1800ft2÷400ft2=4.5 So, 4.5 gallons of paint, or rounding up, 5.