Consumption per lap + Race length (minutes) + Single lap time length.
The first will simply do % per lap * num laps, the second will calculate the number of laps using the race length and the lap time length then multiply that by consumption per lap.
The only drawback to this is that depeding on the gearing of your setup you'll get different fuel consumption compared to another driver. If you've already had to figure out your particular fuel consumption, you've probably figured out your total fuel needed already for that particular race.