MPG — miles driven divided by gallons used — is the basic fuel-economy figure. Track it tank to tank to spot a drop that signals a maintenance issue.
The example
360 miles, 12 gallons.
| A | B | |
|---|---|---|
| 1 | Item | Value |
| 2 | Miles | 360 |
| 3 | Gallons | 12 → 30 MPG |
The formula
The formula:
How it works
How it works:
- Divide miles driven on a tank by the gallons it took to refill.
- Use the trip odometer reset at fill-up for an accurate per-tank figure.
- Average across tanks with
AVERAGE, or compute lifetime astotal_miles / total_gallons. - For L/100km (metric), the relationship is inverse — lower is better.
Lifetime MPG isn’t the average of tank MPGs. Average the ratios and a small low-mileage tank counts as much as a big one. The correct lifetime figure divides total miles by total gallons — SUM(miles) / SUM(gallons) — which weights each tank by its actual fuel use.
Try it: interactive demo
Miles driven and gallons used.
Variations
Lifetime MPG
Weighted right:
L/100km
Metric:
Range on a tank
How far:
Pitfalls & errors
Full-to-full. Measure gallons by refilling to the same level each time.
Don’t average ratios. Use total miles ÷ total gallons for lifetime.
Zero gallons. A missing fill gives #DIV/0!.
Practice workbook
Frequently asked questions
How do I calculate MPG in Excel?
How do I get accurate lifetime MPG?
How do I convert to L/100km?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class