Skip to content

Gas mileage calculator

Work out MPG and L/100 km, and keep a fill-up log to spot a drop.

  • Free, no sign-up
  • Formula shown below
  • Runs in your browser
mi
Trip meter since your last full tank.
gal
From the pump, filled until it clicks off.

Your fill-up log

No fill-ups logged yet. Add one above to start tracking your average.

Saved only in this browser. Nothing is uploaded.

Your result

Enter miles driven and gallons to see your MPG.

How the calculator works it out

Gas mileage is distance divided by fuel. Fill the tank, drive, fill it again, and the gallons the pump takes the second time are the gallons you burned over the miles on your trip meter.

MPG = miles driven ÷ gallons used
L/100 km = 235.215 ÷ MPG
km per liter = MPG × 0.4251
Log average = total miles ÷ total gallons

The conversion constants use the exact US gallon (3.785411784 liters) and the exact mile (1.609344 km) listed in NIST Handbook 44, Appendix C.

Worked example

You reset the trip meter at a full tank and drive 350 miles. Back at the pump it takes 12.5 gallons to fill up. 350 ÷ 12.5 = 28 MPG. In metric, 235.215 ÷ 28 = 8.40 liters per 100 km.

Now say your log has four tanks: 300 mi on 10 gal, 280 on 10, 330 on 11 and 250 on 10. The average is 1,160 ÷ 41 = 28.3 MPG. The last tank, at 25 MPG, is about 15% worse than the 29.4 MPG of the three before it, which is worth a look: tire pressure, a dragging brake, a roof box or a run of short winter trips are common reasons.

Compare with your car’s rating

Look up your exact year, make, model and engine on fueleconomy.gov, the official EPA and Department of Energy site. The EPA’s combined figure assumes 55% city and 45% highway driving, so a mostly-highway commuter can beat it and a stop-and-go city driver will often fall short. The fueleconomy.gov driving tips say speeding, rapid acceleration and hard braking can lower gas mileage by roughly 15% to 30% at highway speeds and 10% to 40% in stop-and-go traffic.

Getting a reliable number

  • Fill until the pump clicks off, both times, ideally at the same pump.
  • Log several tanks before reading much into the trend. One tank can be off by a few percent just from how the pump shuts off.
  • If you skip a fill-up or buy a partial tank, leave that entry out.

Questions people ask

How do I calculate my gas mileage by hand?

Fill the tank and reset the trip meter. Drive as normal, then fill up again and note how many gallons the pump took. Divide the miles on the trip meter by those gallons. 350 miles on 12.5 gallons is 350 ÷ 12.5 = 28 MPG.

Why is my MPG lower than the EPA sticker?

Fueleconomy.gov lists five reasons real mileage differs from the label: how and where you drive, vehicle condition and maintenance, fuel variations, differences between individual cars, and engine break-in. Speeding and rapid acceleration alone can cost roughly 15% to 30% at highway speeds. Compare your log with the rating for your exact year, model and engine.

Should I average the MPG of each fill-up?

No. Add up all the miles and all the gallons, then divide. A short tank and a long tank would count equally if you averaged the MPG figures, which skews the result. The log on this page uses total miles ÷ total gallons.

How do I convert MPG to liters per 100 km?

Divide 235.21 by the MPG. 28 MPG is 235.21 ÷ 28 = 8.40 L/100 km. The number comes from 100 × 3.785 liters per US gallon ÷ 1.609 km per mile. Note that a lower L/100 km is better, the opposite of MPG.

Do I need to fill the tank all the way each time?

For an accurate figure, yes: fill until the pump clicks off both times, at the same pump if you can. A partial fill means the gallons you buy no longer match the gallons you burned. If you missed a fill-up, skip that entry rather than guess.

Where is my fill-up log stored?

Only in this browser, using local storage. Nothing is sent to us. Clearing your browser data or using a private window removes it, and it will not appear on your other devices.

Guides for this tool