If you are using gallons per 100 mi to measure consumption, then the formula for calculating the amount of fuel needed is: Fuel = 500 / 100 x 20 = 25 gallons.