Home › Auto › Gas Mileage Calculator

Gas Mileage (MPG) and Fuel Cost Calculator

Fill the tank, reset the trip meter, and at the next fill-up enter the miles driven and the gallons it took. Add a trip distance to estimate its fuel cost.

mi
gal
$
mi

Fuel economy

—

Cost per mile
—
Metric equivalent
—
Fuel cost for the trip
—

Tips for using the gas mileage calculator

  • Keep tires inflated to the door-placard pressure; low tires cut MPG.
  • Highway speeds above 60 mph reduce fuel economy noticeably in most cars.
  • Roof racks and boxes can cut highway MPG by 10% or more.

How the gas mileage calculator works

The fill-up method is the most reliable way to measure real-world fuel economy. Fill the tank completely, reset the trip odometer, drive normally, and fill up again. The fuel needed to refill the tank is what you used.

MPG = Miles driven ÷ Gallons used
Cost per mile = Price per gallon ÷ MPG
L/100 km = 235.215 ÷ MPG

Dashboard MPG readouts are often a few percent optimistic, so the fill-up method is a good check. Average over two or three tanks to smooth out differences in how full the pump fills the tank. Most of the world measures fuel use in liters per 100 km, where lower is better.

Worked example

You drove 350 miles and it took 12.5 gallons to refill: 28.0 MPG, or 8.4 L/100 km. At $3.50 a gallon that is 12.5 cents per mile. A 500-mile road trip would use about 17.9 gallons and cost $62.50 in fuel.

Frequently asked questions

How do I calculate MPG?

Divide the miles driven since your last full tank by the gallons it took to refill.

How do I convert MPG to L/100 km?

Divide 235.215 by the MPG. 30 MPG is 7.8 L/100 km.

Why is my MPG lower than the EPA rating?

Short trips, cold weather, aggressive driving, idling and heavy loads all lower real-world economy.

How much does a trip cost in gas?

Divide the distance by your MPG and multiply by the gas price.

Updated October 2026. Results are estimates for education, not financial or medical advice. All math runs in your browser; nothing you type is sent anywhere.

Related calculators