This equation computes fuel efficiency from total distance driven and total volume of fuel consumed. It defaults to miles per gallon but you can use other volume and distance units.
Notes
For every gallon of gas consumed about 19.6 pounds of carbon dioxide are produced.