Miles Per Gallon Calculator
How do you calculate your miles per gallon? Divide the miles you drove by the gallons of fuel you used. Fill up, reset your trip odometer, drive, fill up again, and enter both numbers here — you get your MPG, and if you add your fuel price, your cost per mile and the cost of the trip.
Leave this at 0 if you only want the MPG. With a price, the page also shows cost per mile and the fuel cost of the trip.
Formula: MPG = miles driven ÷ gallons used; cost per mile = fuel price ÷ MPG; trip fuel cost = miles × cost per mile. Last verified November 2026.
Frequently Asked Questions
How do you calculate your miles per gallon?
Divide the miles you drove by the gallons of fuel you used: MPG = miles ÷ gallons. Example: 300 miles on 10 gallons = 30 MPG. The most accurate way is the fill-up method — fill the tank, reset the trip odometer, drive normally, fill up again, and use the miles on the trip odometer and the gallons on the second receipt.
What is a good MPG?
It depends on the vehicle. Most gasoline cars and SUVs land between about 20 and 35 MPG; hybrids commonly reach 40–55 MPG; full-size trucks often sit around 15–22 MPG. Your car's EPA combined rating is the fair comparison point — if your measured MPG is far below it, check tire pressure, air filter, and driving habits before assuming something is broken.
How do I calculate cost per mile?
Divide your fuel price per gallon by your MPG. At $3.50 per gallon and 30 MPG, each mile costs about $0.117. Multiply that by any trip distance to get the trip's fuel cost: 300 miles × $0.117 ≈ $35.00.
Why does my MPG change from tank to tank?
Highway driving is much more efficient than stop-and-go city driving, so the mix matters most. Cold weather, short trips, roof cargo, under-inflated tires, aggressive acceleration, and running the air conditioner all lower MPG. One tank is a snapshot — average three or more fill-ups for a reliable number.
Can I use this for diesel, or for liters and kilometers?
The math is the same for diesel — enter the gallons of diesel you used. For metric units, divide liters by 100 km instead: fuel consumption in L/100 km = liters used ÷ (kilometers driven ÷ 100). A 30 MPG car uses about 7.8 L/100 km.