DIY Cost Tools
MPG Calculator
Automotive calculator
MPG Calculator
Calculate miles per gallon, metric fuel consumption, and optional fuel cost per mile from one trip or tank.
How to calculate miles per gallon
Miles per gallon compares the miles driven with the gallons consumed. Record the odometer or trip-meter distance and the amount needed to refill the tank. A full-tank-to-full-tank measurement is usually more useful than relying on a dashboard estimate.
L/100 km = 235.214583 ÷ MPG
Fuel cost per mile = price per gallon ÷ MPG
Worked example
A vehicle travels 320 miles and uses 10 gallons. The fuel economy is 320 ÷ 10 = 32 MPG. At $3.50 per gallon, the estimated fuel cost is about $0.109 per mile. The equivalent metric consumption is about 7.35 L/100 km.
For a fair comparison
- Fill at the same pump orientation and stop point when possible.
- Reset the trip meter after filling and collect several tanks of data.
- Separate towing, winter, city, or highway trips if you want to compare driving conditions.
- Fuel price affects cost per mile, but it does not change measured MPG.
Frequently asked questions
Why is calculated MPG different from the dashboard?
The dashboard is an estimate based on sensor data. Dividing measured distance by refill gallons gives a tank-level result, although pump shutoff and odometer differences still introduce variation.
How do I convert MPG to L/100 km?
For U.S. gallons, divide 235.214583 by MPG. Because lower L/100 km is better while higher MPG is better, the two scales move in opposite directions.
Should I use one tank or several?
Several tanks reduce the effect of fill-level variation and unusual trips. Add all miles and all gallons first, then divide the totals; do not simply average individual MPG readings.
How to get a dependable result
- Use measurements from the same trip, billing period, or planning scenario.
- Keep units consistent and enter positive numbers unless the field explicitly allows zero.
- Treat the result as an estimate. Real-world conditions, rounding, equipment efficiency, and changing prices can affect the final amount.
Related calculators
Sources and review notes
The arithmetic follows standard U.S. customary fuel-economy relationships. Consult the vehicle owner’s manual for vehicle-specific operating guidance.
Last reviewed September 2026. This calculator provides an estimate for planning and education; it is not a substitute for a manufacturer specification, professional inspection, or safety advice.