Automotive

Gas Mileage Calculator

Free gas mileage calculator. Find your MPG from one or several fill-ups, in miles and gallons or km and liters, with the cost per mile and a yearly estimate.

Share:X
Loading calculator interface...

How the Gas Mileage Calculator Works


Gas mileage tells you how far your vehicle goes on a certain amount of fuel. In the United States it is measured in miles per gallon (mpg), and in most other countries in liters per 100 kilometers. The Gas Mileage Calculator finds it from the distance you drove and the fuel you put in the tank, and it can combine several fill-ups for a more reliable number.

The formula

miles per gallon = miles driven / gallons used
liters per 100 km = liters used / kilometers driven x 100
kilometers per liter = kilometers driven / liters used

The calculator changes every unit to kilometers and liters inside, so it can show the result in all of them. One mile is 1.609344 km, one US gallon is 3.7854 liters, and one UK gallon is 4.5461 liters.

Worked example: one fill-up

You drove 350 miles, and then it took 12.5 gallons to fill the tank again.

ResultValue
Miles per US gallon (350 / 12.5)28 mpg
Miles per UK gallon33.63 mpg
Kilometers per liter11.9 km/L
Liters per 100 km8.4

Several fill-ups: use the totals

One tank can give an odd number, because the pump stops at a different point each time. It is better to record several fill-ups. When you do, the overall mileage is the total distance divided by the total fuel. It is not the average of the separate mpg numbers, which is wrong when the tanks are not the same size.

Fill-upMilesGallonsMPG
13001030
24502022.5
Overall7503025

The average of 30 and 22.5 is 26.25, which is too high. The right answer is 750 / 30 = 25 mpg, because the second tank used more fuel and counts more. Each block of the chart is 0.75 mpg.

Fill-up 1 ████████████████████████████████████████ 30.0 mpg
Fill-up 2 ██████████████████████████████ 22.5 mpg
Overall   █████████████████████████████████ 25.0 mpg

What the mileage costs

cost per mile = price of a gallon / miles per gallon
fuel for a year = miles per year / miles per gallon
yearly cost = fuel for a year x price of a gallon

In the example of 25 mpg, with fuel at $3.50 a gallon, one mile costs $0.14, and 12,000 miles a year use 480 gallons and cost $1,680.

Table: mileage, consumption and yearly cost

For 12,000 miles a year with fuel at $3.50 a gallon:

MPG (US)Liters per 100 kmKm per literGallons a yearCost a year
20 mpg11.768.50600$2,100
25 mpg9.4110.63480$1,680
28 mpg8.4011.90429$1,500
30 mpg7.8412.75400$1,400
35 mpg6.7214.88343$1,200
40 mpg5.8817.01300$1,050

Each block of the chart is about $52.5 a year. Red is under 20 mpg, amber is 20 to 30 mpg, and green is over 30 mpg.

20 mpg  ████████████████████████████████████████ $2,100
25 mpg  ████████████████████████████████ $1,680
28 mpg  █████████████████████████████ $1,500
30 mpg  ███████████████████████████ $1,400
35 mpg  ███████████████████████ $1,200
40 mpg  ████████████████████ $1,050

Going from 20 to 25 mpg saves $420 a year, while going from 35 to 40 mpg saves only $150. A gain is worth more when the mileage is low.

The zones of the calculator

The bars in the calculator use a rough guide for cars. Each block is 1.5 mpg, from 0 to 60.

████████████████████████████████████████
0 mpg          20      30                          60
  • Red, under 20 mpg: thirsty. Common for large trucks and older cars.
  • Amber, 20 to 30 mpg: average for many cars.
  • Green, over 30 mpg: efficient.

How to measure your mileage

  1. Fill the tank to the top, and write down the odometer. You can also set the trip meter to zero.
  2. Drive as usual until the tank is about half empty or lower.
  3. Fill the tank to the top again, with the same pump if you can, and write down the gallons that went in and the miles on the trip meter.
  4. Enter them as a fill-up. Repeat this for three to five tanks, and add each one to the calculator.

Tips to improve your mileage

  • Drive smoothly. Hard acceleration and braking use a lot of fuel.
  • Check the tire pressure every month. Soft tires use more fuel.
  • Slow down on the highway. The fuel use goes up fast above about 55 mph (90 km/h).
  • Take off what you do not need, such as heavy loads and a roof rack.
  • Do not idle for a long time, and keep the car serviced.

What this calculator does not include

  • Electric cars and plug-in hybrids, which use kilowatt-hours.
  • The difference between city and highway driving, unless you record them as separate fill-ups.
  • The price of a fuel in another currency (the number is the same, but the symbol shown is a dollar sign).
  • The other costs of driving, such as insurance, repairs and the loss of value.

This tool gives an estimate for general information. A car's trip computer can differ from the pump by a few percent.

Frequently Asked Questions

Is the Gas Mileage Calculator free to use?+

Yes. The Gas Mileage Calculator, and every other tool on CalculatorBooth, is completely free to use with no sign-up or account required.

Is my data stored or shared?+

All computations are performed locally in your browser. No private inputs or parameters are stored or transmitted.

How accurate is this calculator?+

It's built and tested for accuracy, but the result is an estimate for planning purposes. It isn't a substitute for advice from a qualified financial, medical, or legal professional.

Related Calculators