Gas Mileage (MPG) Calculator
Use this gas mileage calculator to easily calculate the gas mileage of a vehicle: car, bus, truck, etc. in miles per gallon (mpg), kilometers per liter... Calculate your fuel cost efficiency in USD per mile, miles per $, etc.
* see the explanation about the MPG illusion in the "Fuel economy vs. Fuel Efficiency. The MPG illusion." section below.
How to calculate miles per gallon?
To calculate gas mileage, using our MPG calculator or otherwise, you need to know three things: the previous reading of your odometer (in miles or kilometers), the current reading of the odometer, and the amount of fuel you put in your tank during the previous refill. That is all. Our online gas mileage calculator supports both gallons and miles, as well as liters and kilometers.
The output is gas mileage in mpg (miles per gallon) or km/l (kilometers per liter), depending on the metric system you chose. If you supply price per gallon or price per liter, the gas calculator will also output gas cost per mile and miles per 1 USD, and if using the metric system the fuel cost will be in currency per kilometer (e.g. $ per km) and km per $.
The formula to calculate mpg is:
Gas mileagempg = (Current reading - Previous reading) / (Gas added to tank)
Calculating the cost per mile (or cost per kilometer), which is something our mpg calculator also does, is just a matter of a slight modification of the above formula:
Gas costmiles per $ = (Price per gallon x Gas added to tank) / (Current reading - Previous reading)
In both formulas above "current" and "previous" reading refers to the reading of your odometer in miles or kilometers at the point of the previous refilling of the tank and at the current (latest) one. These are also the equations used in our MPG calculator.
How to get better gas mileage?
If you don't like the result from our MPG calculator and wonder how you can get a better gas mileage from your vehicle, we have some advice for you. You can cover more miles (or kilometers) with less fuel by following these 10 tips for improving mpg that can result in significant savings in gas costs, especially when applied consistently:
- Drive sensibly - Driving aggressively, driving too fast compared to other cars, the practice of constantly overtaking other vehicles, and rapid acceleration followed by braking wastes a lot of gas. According to some estimates, quick starts and hard stops can increase gas consumption by more than 30%! Driving sensibly can result in a huge improvement in mpg.
- Observe the speed limit - Different vehicles have optimal fuel economy at different velocities, but one way to increase gas mileage is to avoid driving at higher speeds. A small reduction of your speed, say from 70 mph to 60 mph (equivalently: from 115 km/h to 100 km/h) can help you save 10 to 20% due to lower fuel consumption. This will improve the results you see from our MPG calculator.
- Follow the leader - drive at about the speed of the vehicle in front of you, if they are following the first 2 tips above. This will make sure you need to accelerate and decelerate as little as possible. If possible, overtake drivers who do not follow them, as it will make it very hard for you to do so.
- Check your tires - make sure your tire pressure is at optimal levels as indicated in the owner's manual provided by the manufacturer. If the tire pressure is too low your mileage will decrease significantly, not to mention that the car may become dangerous to drive.
- Smart routing - try to take optimal paths to reach your desired destination. Learn the different modes of route selection your GPS supports - shortest is not always fastest and idling stuck in traffic will waste fuel. Use live map services such as Google Maps to monitor for traffic congestions on the planned route. Using a route you know well might also help improve gas efficiency as it will decrease the unnecessary changes of speed.
- Air conditioning - turning the air conditioning off will most likely improve your mpg efficiency by about 10-15%, and you will also accelerate quicker when needed. If it is necessary, make sure you do not set it to unreasonably low or high levels. Air temperature in the range between 64°F - 75°F (18°C - 24°C) is comfortable for most people. Due to the law of thermodynamics, each subsequent degree of heating or cooling requires progressively more energy to accomplish and maintain.
- Remove excess weight - make sure you remove all heavy items you that you do not need in that particular trip from your trunk. The lighter the car, the better mpg calculation you will get from our gas calculator.
- Turn on cruise control - when driving on a highway, use your cruise control option. It will save you gas by keeping your speed constant better than you can.
- Avoid idling - idling results in a calculation of 0 miles per gallon. The larger the car engine, the more gas is wasted when idling. Avoid excessive idling, when possible, in line with point #5 above. This will result in a better MPG calculator result.
- Maintain your vehicle - a well-maintained car, truck, van, SUV, etc. will operate at greater efficiency. Exact mpg improvement is hard to calculate, as it will depend on the type of maintenance work your vehicle needs.
All the above advice will help, but what can you do if you have been following the above advice, yet our mpg calculator still results in very high numbers for gas costs? It could be time for a new, more efficient car, or it could be just the gas price fluctuations over which, unfortunately, you have no direct influence. Fuel prices in most locations include license fees and other state or local government taxes, in some places reaching as much as 50% of the final price. Financial market fluctuations, natural disasters or extreme weather, crisis, as well the geographical area you are in and the local fuel suppliers all influence the price of gas. All you can do is try to observe them and predict when you can get a more decent price.
Fuel economy vs. fuel efficiency. The MPG illusion.
To use an MPG calculator without being mislead one needs to understand the MPG illusion. First, basic terminology. The term fuel economy is used when speaking about miles per gallon or kilometers per liter (mpg, km/l). The term fuel efficiency is used when speaking about gallons per mile or gallons per 1,000 miles, and liters per kilometer or liters per 100 km. The first is mostly used in the U.S., U.K., India, Japan, South Korea, Latin America, Denmark, Netherlands, while the second is preferred in most of Europe, Canada, Australia, New Zealand, China, Uruguay, Paraguay and a couple of other countries.
The relationship between the two is non-linear and improvements in miles per gallon can be very deceptive, while fuel efficiency in gallons per mile or liters per km are much more straightforward to understand, as noted on fueleconomy.gov :
"While a miles per gallon (MPG) estimate is a required feature that has appeared on the fuel economy label for several decades, this metric can be potentially misleading when consumers compare fuel economy improvements, particularly when they use it in place of fuel costs. [...] A fuel consumption metric allows for more accurate energy usage comparisons among vehicles."
The graph below illustrates what the U.S. Department of Energy dubs "the MPG Illusion".
The difference in change rate, or the rate of improvement in MPG relative to the gallons a vehicle uses per 1,000 miles stems from the non-linear relationship between the two metrics. For example, an improvement of 5 MPG from 10 MPG to 15 MPG results in about 31 gallons saved over 1,000 miles, while the same 5 MPG improvement, but from 25 MPG to 30 MPG results in less than 7 gallons in fuel costs saved per 1,000 miles.
The illusion is more pronounced if you try to extrapolate or compare gas savings in lower MPG numbers to saving in higher MPG numbers. This MPG illusion is the reason our gas mileage calculator also outputs fuel efficiency in gallons per 1,000 miles.
Issues with averaging fuel economy in MPG
Fuel efficiency and fuel economy can be tricky concepts as demonstrated above, but this also extends to averaging MPG data. For example, let us say you want to compare two types of cars: A and B. You put two researches, one American and one French, to the task, with the first using miles per gallon as an efficiency metric, and the second using gallons per mile. You have each researcher record the efficiency of 2 cars of each type (the data available is the same for both), and the results recorded by them look like so:
Data for car type A:
|Researcher||Car 1||Car 2||Average|
|American (miles per gallon)||1 mpg||4 mpg||2.5 mpg|
|French (gallons per mile)||1 gpm||0.25 gpm||0.625 gpm|
Data for car type B:
|Researcher||Car 1||Car 2||Average|
|American (miles per gallon)||2 mpg||2 mpg||2 mpg|
|French (gallons per mile)||0.5 gpm||0.5 gpm||0.5 gpm|
Average above means the arithmetic mean. The US engineer will see that for type A the average is 2.5 while for type B it is just 2.0, concluding that type A is more efficient than type B as it can cover a larger distance with a gallon of gas. The French will see that for type A the average is 0.625 while for type B it is 0.5 and will conclude that type B is more efficient than type A, as the car will use less fuel to cover the same distance. The two researchers would come to different conclusions as they are using different metrics! Note that our MPG calculator will produce both metrics for you automatically.
But who is right in the above example? Most people would argue that when we calculate gas efficiency we care about how much fuel we would need to cover a given distance. In such a case the French researcher is correct, as the average is misleading the US researcher. Here is an explanation why: if you were to take both cars of type A and want to cover 100 miles with each of them, you would need not 200 / 2.5 = 80 gallons, but 125 gallons of gas (100 gallons for the first car and 25 gallons for the second). The French will get it right by multiplying 200 x 0.625 = 125. For type B both researchers will correctly estimate that 100 gallons will be required for the same task. Therefore, type B is more efficient than type A.
However, if you define efficiency as covering the greatest distance given a certain fuel amount, then the US researcher would be correct. If we give each car of type A a gallon of fuel, they will cover 5 miles combined while giving each car of type B a gallon of fuel, they will cover only 4 miles combined. It follows that type A is more efficient than type B using this definition. Note that the mpg average is not misleading in this case, as it is 2.5 mpg, and 2 x 2.5 = 5, which is correct.
The above is an illustration of why when using our gas mileage calculator in mpg, as well as other such tools, it is important to keep track of the end goal and define the question at hand precisely, before measuring and making conclusions. It is also a lesson on applying appropriate data transformations. The arithmetic average is not invariant to monotonic transformations, so this is an issue when averaging performance of two or more vehicles, or when averaging the performance of a single vehicle in different situations, e.g. highway fuel consumption and city drive consumption could replace Car 1 and Car 2 in the above table and produce the same result.
The car example uses as basis one from Hand D. 1994 .
 U.S. Department of Energy, "Gasoline Vehicles: Learn More About the Label" [online] https://www.fueleconomy.gov/feg/label/learn-more-gasoline-label.shtml#fuel-consumption-rate - point 5: Fuel Consumption Rate, accessed on Mar 22, 2018
 Hand D. (1994) "Deconstructing Statistical Questions", Journal of the Royal Statistical Society, Series A, Vol.157-3:317-356
Cite this calculator & page
If you'd like to cite this online calculator resource and information as provided on the page, you can use the following citation:
Georgiev G.Z., "Gas Mileage (MPG) Calculator", [online] Available at: https://www.gigacalculator.com/calculators/mpg-calculator.php URL [Accessed Date: 30 Nov, 2020].