Gas Mileage Calculator (MPG)
Enter the miles you drove and the fuel you added to get your mpg, L/100 km and fuel cost per mile, or compare two vehicles.
Recent
Your last 10 settings, saved only in this browser. Nothing is uploaded.

How to use the Gas Mileage Calculator
- Under “What do you want to do”, choose “Find my MPG from a fill-up” to check one tank, or “Compare two vehicles” to compare yearly costs.
- In fill-up mode, set “Distance from” to “Trip meter” or “Odometer readings”.
- If you chose “Trip meter”, enter the distance in “Miles or kilometers driven” and pick mi or km.
- If you chose “Odometer readings”, enter “Odometer at the first fill-up” with its unit, then “Odometer at the next fill-up”.
- Enter “Fuel added at the next fill-up” in gal or L.
- Choose “Gas price: state” and “Fuel type”.
- Enter “Price per gallon or liter” to get a cost. Leave it empty to skip the cost.
- Read “Fuel economy” first, then check the other results.
- In compare mode, enter “Vehicle A fuel economy” and “Vehicle B fuel economy” in mpg, L/100 km, or km/L. Then set “Distance driven per year” and the price fields. Read “Yearly difference” first.
Four presets are built in: 330 miles on 11 gallons, an odometer change from 120,400 to 120,742, 600 km on 45 liters, and Compare 28 vs 38 mpg. Load one to see how the results look before you enter your own numbers. The help text under the controls explains the full-tank method.
How do I calculate gas mileage?
Gas mileage is the miles driven divided by the gallons used. Use a full tank for each reading. Fill to the pump’s click-off, reset the trip meter or write down the odometer, drive, then fill to the click-off again. Miles driven since the last full fill-up ÷ gallons needed to fill up again gives your mpg.
For example, 330 mi ÷ 11 gal = 30 mpg. With an odometer, the distance is the second reading minus the first. An odometer change from 120,400 to 120,742 is 342 mi. Divide that by 12.5 gal and you get 27.4 mpg. A partial fill gives a wrong number, because the fuel added no longer matches the miles driven.
How do I convert L/100 km to mpg?
Divide 235.2146 by the L/100 km figure: mpg = 235.2146 ÷ L/100 km. A value of 7.84 L/100 km gives about 30 mpg. To go the other way, L/100 km = 235.2146 ÷ mpg, so 30 mpg is 7.84 L/100 km.
The constant comes from the exact unit values: 1 gallon is 3.785411784 liters, and 1 mile is exactly 1.609344 km. Note that the two units run in opposite directions. A higher mpg is better, but a lower L/100 km is better.
How much does my mpg cost per mile?
Cost per mile = price per gallon ÷ mpg. Multiply that by 100 to get the cost per 100 miles. At $3.60 per gallon and 30 mpg, the fuel costs $0.12 per mile, or $12.00 per 100 miles. The fuel cost of one tank is the gallons added × the price, so 11 gallons at $4.354 comes to $47.89.
How do I compare two cars’ fuel costs?
Use “Compare two vehicles”, enter each car’s economy, and set the yearly distance. Yearly fuel cost = yearly miles ÷ mpg × price. At $4.00 per gallon over 12,000 miles a year, a car at 25 mpg uses $1,920 of fuel. A car at 40 mpg uses $1,200. The difference is $720 a year, or $60 a month. The tool states this as “Vehicle B saves $X per year ($Y per month)”.
Does it work in liters?
Yes. Enter fuel in liters and distance in kilometers, and the results also appear in L/100 km and km/L. The conversion is km/L = mpg × 1.609344 ÷ 3.785411784, so 30 mpg is about 12.75 km/L. Going the other way, 600 km on 45 L is 7.5 L/100 km, which is 31.4 mpg.
Worked examples
| Input | Result |
|---|---|
| 330 mi driven, 11 gal added | 30.0 mpg = 7.84 L/100 km = 12.75 km/L |
| odometer 120400 to 120742 mi driven, 12.5 gal added | 27.4 mpg = 8.60 L/100 km = 11.63 km/L |
| 600 km driven, 45 L added | 31.4 mpg = 7.50 L/100 km = 13.33 km/L |
| A 28 mpg vs B 38 mpg, 12000 mi per year | $1,866.00 vs $1,374.95 per year: Vehicle B saves $491.05 per year ($40.92 per month) |
| A 9 L/100 km vs B 6 L/100 km, 20000 km per year | $2,961.00 vs $1,974.00 per year: Vehicle B saves $987.00 per year ($82.25 per month) |
Calculated by the tool above; open it with the same values to see each step.
Frequently asked questions
What is a good MPG?
The tool does not rate vehicles. Compare your result with the official rating for your own vehicle at fueleconomy.gov. Your driving habits and the trip itself will affect your number.
Can I use the odometer instead of the trip meter?
Yes. Choose “Odometer readings” under “Distance from”, then enter the odometer at the first fill-up and at the next one. The second reading must be higher than the first, or the tool shows an error.
Why does my trip computer show a different number?
Trip computers estimate fuel use. The fill-up method is based on the fuel the pump actually delivered, so the two numbers can differ.
Is MPGe the same as gas mileage?
No. MPGe applies to electric vehicles and is not gas mileage. The tool shows a warning for any mpg above 150.
What do the warnings mean?
The tool warns when mpg is above 150 or below 3, when the price is above $15 or below $1 per gallon, and when a fill is over 60 gallons. Check your numbers if you see one.
Where do the gas prices come from?
The default prices are the EIA weekly retail figures for the week of Oct 5, 2026. The national regular price is $4.354 per gallon, and the national diesel price is $6.199. The state or region price is named on the page. Prices change, so enter your own price if you need a current one.
Does the tool send my numbers anywhere?
No. The tool runs in your browser, and nothing you type is sent anywhere. It is free and needs no sign-up.
Related tools
- Gas cost calculator: use it when you want the fuel cost of a trip.
- Road trip cost calculator: use it to estimate the total cost of a longer drive.
- Cost per mile calculator: use it to work out the cost of each mile, beyond fuel alone.
- Travel budget calculator: use it to plan spending across a whole trip.
- National park entrance fees: use it to look up the entrance fees listed for national parks.
- America the Beautiful pass calculator: use it to see the pass options that the official pages list.
- Travel itinerary template: use it to lay out your route and stops day by day.