MPG Calculator Formula
Understand the math behind the mpg calculator. Each variable explained with a worked example.
Formulas Used
Miles Per Gallon
mpg = miles_driven / gallons_usedLiters per 100 km
liters_per_100km = 235.215 / (miles_driven / gallons_used)Fuel Cost per 100 Miles (@$3.50/gal)
cost_at_350 = 100 / (miles_driven / gallons_used) * 3.50Variables
| Variable | Description | Default |
|---|---|---|
miles_driven | Miles Driven(miles) | 350 |
gallons_used | Gallons Used(gal) | 12.5 |
How It Works
How to Calculate MPG
Divide the total miles driven by the gallons of fuel consumed.
Formula
MPG = Miles Driven / Gallons Used
Conversion to L/100km
L/100km = 235.215 / MPG
Worked Example
You drove 350 miles and used 12.5 gallons.
- 01MPG = 350 / 12.5 = 28.0 MPG
- 02L/100km = 235.215 / 28.0 = 8.4 L/100km
- 03Fuel cost per 100 miles = 100/28 x $3.50 = $12.50
Frequently Asked Questions
What is good MPG?
Average new car MPG is about 25-30 combined. Hybrids get 40-60 MPG. Trucks and SUVs typically get 15-25 MPG.
How do I accurately measure MPG?
Fill your tank completely, reset the trip odometer, drive normally, then fill up again. Divide miles driven by gallons to refill.
What affects MPG?
Speed, acceleration habits, tire pressure, vehicle weight, wind resistance, terrain, air conditioning use, and engine maintenance all affect fuel economy.
Learn More
Guide
Fuel Economy Guide - Understanding MPG and Fuel Costs
Learn how to calculate fuel economy, compare MPG ratings, and estimate trip fuel costs. Covers miles per gallon, liters per 100 km, and money-saving driving tips.
Ready to run the numbers?
Open MPG Calculator