Gas Mileage Calculator

Units
mi
mpg
gal

Enter either MPG or fuel used, whichever you know. Filling one clears the other, since only one is needed to calculate the rest.

This is a simple average over the distance and fuel entered, not a real time or per trip efficiency reading. Miles per gallon is calculated using the US gallon, not the larger UK/imperial gallon.

This free gas mileage calculator solves for whichever value you don't already know: fuel economy (MPG or km/L) from a distance and fuel used, or fuel needed from a distance and your car's rated MPG or km/L. Nothing you enter is sent anywhere or stored.

How to Use It

  1. Enter the distance you traveled.
  2. Enter either your fuel economy (MPG, or km/L in Metric mode) or fuel used, whichever you know.
  3. The calculator solves for whichever one you left blank.

How It Works

The relationship behind this calculator is simple: distance equals fuel used times fuel economy. Given distance and any one of fuel used or fuel economy (MPG in Imperial mode, km/L in Metric mode), the other follows directly. Rather than always showing every possible figure the calculation could produce, the result shown is only the one you didn't already enter, in the unit your active mode actually uses.

Formulas

distance = fuel used × MPG

MPG = distance ÷ fuel used

fuel used = distance ÷ MPG

A worked example: 300 miles on 10 US gallons works out to 30.0 MPG. Going the other direction, a planned 400 mile trip in a car rated at 32 MPG will need about 12.5 gallons of fuel. The same relationship holds in Metric mode: 500 kilometers on 40 liters works out to 12.5 km/L, and a planned 500 kilometer trip at 12.5 km/L will need about 40.0 liters.

This is a simple average over the distance and fuel entered, not a real time or per trip efficiency reading, and it uses the US gallon rather than the larger UK/imperial gallon. Everything runs client-side in your browser. Nothing you enter is sent anywhere or stored.

Frequently Asked Questions

What do MPG and km/L mean?

Miles per gallon (MPG) and kilometers per liter (km/L) both measure distance covered per unit of fuel, so a higher number means better fuel economy in both cases. MPG is shown in US / Imperial mode and km/L in Metric mode, matching the unit each system actually uses, rather than mixing in a figure from the other system.

Why does this use the US gallon specifically?

A US gallon and a UK/imperial gallon are different sizes (the imperial gallon is about 20% larger), so an MPG figure calculated with one is not directly comparable to one calculated with the other. This calculator always uses the US gallon for its MPG figure.

Does switching units change my result?

No, switching between US/Imperial and Metric only changes which figures you can enter and see, miles/gallons/MPG versus kilometers/liters/km-L, not the underlying relationship between distance, fuel, and fuel economy.

Is this a real time fuel efficiency reading?

No, this is a simple average over the whole distance and fuel amount you entered, similar to a tank to tank calculation. It does not account for how driving conditions, speed, or terrain varied during that distance.

Why would I enter MPG or km/L instead of fuel used?

They answer two different questions. Entering fuel used tells you what mileage you actually achieved on a trip you already drove, and the calculator shows you the MPG or km/L that works out to. Entering your car's rated MPG or km/L instead answers a different, forward looking question: how much fuel a planned trip of a given distance will need. Fill in whichever one you know, and the calculator solves for the other.