Skip to content

Free tool

Miles Per Gallon (MPG) Calculator

Work out your car's miles per gallon, cost per mile, and the fuel cost of any trip. Enter miles driven, gallons used, and the price of gas.

How to use the MPG Calculator

  1. Fill your tank and reset the trip meter.
  2. At the next fill-up, enter the miles driven and the gallons it took to refill.
  3. Add the gas price and a trip distance to see cost per mile and trip cost.

How to get better gas mileage

  • Keep tires filled to the pressure on the sticker inside the driver's door.
  • Drive smoothly. Hard starts and stops waste gas.
  • Slow down on the highway.
  • Remove roof racks and heavy items you do not need.
  • Keep up with oil changes and air filters.

Walmart+ members can save up to 10 cents a gallon at some stations. See if it pays off with our Walmart+ savings calculator.

Frequently asked questions

How do I calculate miles per gallon?

Divide the miles you drove by the gallons you used. For example, 320 miles ÷ 11.5 gallons = about 27.8 MPG.

Why is my real MPG lower than the sticker?

City driving, cold weather, short trips, heavy loads, low tire pressure, and fast highway speeds can all lower real-world MPG.