How do You Calculate Miles Per Gallon?

The way I calculate miles per gallon is fill my car, reset the trip meter and drive until you need gas again. Then you fill your car again but make sure you look at how many gallons it takes to fill it. Then take the miles on your trip meter and divide by the number of gallons it took to fill the car. This will tell you how many miles per gallon your car is getting.