How Gas Mileage Is Calculated
Gas mileage is the distance traveled per unit of fuel consumed:
MPG = Distance (miles) / Fuel Used (gallons)
For km per liter:
km/L = Distance (km) / Fuel Used (liters)
To convert MPG to km/L, multiply by 0.4251. To find cost per mile: divide fuel price per gallon by MPG.
Variable Definitions
Distance Driven: The total distance traveled on a tank of fuel or between fill-ups, in miles or kilometers. Use your trip odometer for accuracy rather than estimating from a map.
Fuel Used: The total fuel consumed during the trip, in gallons or liters. The most accurate method is to fill the tank completely, drive, then fill again and note how much fuel went in.
Fuel Price: The cost per gallon or per liter of fuel. This is optional but lets you see cost per mile and cost per km, which is useful for budgeting and comparing vehicles.
Worked Example
You drove 350 miles and used 12 gallons of gas at $3.50 per gallon:
- MPG = 350 / 12 = 29.17 MPG
- km/L = 29.17 x 0.4251 = 12.40 km/L
- Cost per mile = $3.50 / 29.17 = $0.120 per mile
- Cost per km = $0.120 / 1.609 = $0.075 per km
Edge Cases and Advanced Scenarios
Why MPG drops in city driving: In city driving, engines idle at traffic lights, accelerate from stops, and run accessories (A/C, headlights). These consume fuel without adding distance. City MPG is typically 20-30% lower than highway. Hybrid vehicles close this gap because they recapture energy during braking and shut off the engine at idle.
Seasonal MPG changes: Cold weather reduces MPG by 10-20%. Winter-blend gasoline has lower energy content, cold engines are less efficient, and tire pressure drops (each 1 PSI drop costs about 0.2% in fuel economy). Warming up your car for more than 30 seconds wastes fuel without improving engine performance.
What to Do with Your Result
- Track your MPG over several fill-ups to establish a baseline. A sudden drop may indicate a maintenance issue (dirty air filter, underinflated tires, failing O2 sensor).
- Compare your result to your vehicle's EPA rating to see if you are above or below the official estimate.
- Use the cost-per-mile figure to compare the true running cost of different vehicles you are considering.
- Improve MPG by maintaining steady speeds, keeping tires inflated to spec, removing excess weight, and avoiding aggressive acceleration.