Use this mileage calculator to find MPG, trip gas cost, cost per mile, and yearly savings from better fuel economy.
Advanced options
How to use our Mileage Calculator
- Choose a value under "What do you want to calculate?": Mileage (MPG) from a trip, Trip fuel cost, or Savings from better MPG.
- Enter the matching fields for that mode. In Mileage mode, use either "Distance traveled (miles)" or "Odometer start (miles)" and "Odometer end (miles)" based on "Distance input method", then enter "Fuel used (gallons)".
- If needed, open "Advanced options" and set "Trip type", "Real-world MPG adjustment (percent)", "Fill-up quality", or "Decimals to show (count)".
- Click Calculate. Then check "Distance used in the math" to make sure the calculator used the trip length you expected, especially if you chose round trip or odometer readings.
- Read the main result first, then use "Fuel cost per mile", "Fuel needed", or yearly savings values to compare trips or cars more easily.

Definitions
MPG: Miles per gallon. It shows how many miles a car travels on 1 gallon of gas. Higher MPG means better fuel economy.
Odometer: A vehicle gauge that measures distance traveled [2][3].
Fuel used (gallons): The gallons burned during the trip you are measuring.
Gas price (USD per gallon): The price of one gallon of gas used to estimate fuel cost.
Real-world MPG adjustment (percent): A percent change to your usual MPG for conditions like traffic, hills, weather, or cargo.
Fuel cost per mile: Average gas cost for each mile driven, based on gas price and MPG.
Yearly fuel saved: The difference in gallons used per year between your current MPG and improved MPG.
Common mistakes and quick fixes
Mistake: Entering your total car mileage in "Distance traveled (miles)" instead of the miles for one trip.
Fix: Enter only the miles driven for that fill-up or trip, or switch "Distance input method" to odometer and use "Odometer start (miles)" plus "Odometer end (miles)".
Mistake: Reversing "Odometer start (miles)" and "Odometer end (miles)".
Fix: Make sure "Odometer end (miles)" is greater than "Odometer start (miles)" so the distance comes out positive.
Mistake: Using a blank or zero value for "Fuel used (gallons)", "Car mileage (MPG)", "Current mileage (MPG)", or "Improved mileage (MPG)".
Fix: Enter a number greater than 0 in the MPG or gallons field required for your chosen mode.
Mistake: Forgetting that "Trip type" is set to round trip, so the cost looks too high.
Fix: Check "Distance used in the math" after calculating. If it doubled your "Trip distance (miles)", change "Trip type" to one-way.
Mistake: Treating a partial tank top-off like a full fuel measurement in Mileage mode.
Fix: If the tank was not measured full-to-full, set "Fill-up quality" to partial or unsure and use the "Trip data note" as a reliability warning.
Mistake: Expecting "Yearly money saved" to always be positive.
Fix: If "Improved mileage (MPG)" is lower than "Current mileage (MPG)", a negative result means you would spend more on gas, not save money.
Limitations & Key Assumptions / Boundary Conditions
- Mileage mode estimates MPG from your trip data only. It is most reliable when "Fill-up quality" is full tank to full tank.
- If you use a partial fill or are unsure about the fill, the calculator still works, but the MPG result may be less reliable.
- Trip fuel cost assumes the same gas price for the whole trip and does not include tolls, parking, maintenance, or other driving costs.
- "Real-world MPG adjustment (percent)" changes MPG by a simple percent. Actual fuel economy can vary for many reasons, including speed, traffic, weather, terrain, tire pressure, and vehicle load.
- Round trip doubles only "Trip distance (miles)" in Trip fuel cost mode. It does not change yearly miles in Savings mode.
- Negative values for "Yearly fuel saved" or "Yearly money saved" mean the new MPG is worse, so you would use more fuel or spend more money.
- Cost per mile needs a positive trip distance and positive MPG. If distance is 0, trip fuel and trip cost can be 0, but cost per mile is not meaningful.
Methodology
How the calculator works
The calculator uses one of three paths based on your selected mode: trip MPG, trip fuel cost, or yearly savings from better MPG.
Mileage from a trip
If you choose manual distance, the trip distance is the value from "Distance traveled (miles)".
MPG = distance_miles / fuel_gallons
If you choose odometer readings, distance comes from the difference between the ending and starting readings.
distance_miles = odometer_end - odometer_start
MPG = distance_miles / fuel_gallons
Example: if "Odometer start (miles)" is 15,200 and "Odometer end (miles)" is 15,450, then distance is 250 miles. If "Fuel used (gallons)" is 8.3333, then MPG is about 30.
Trip fuel cost
The calculator first adjusts MPG if you enter a real-world percent change.
adjusted_mpg = vehicle_mpg x (1 + mpg_adjust_pct/100)
Then it sets the trip distance used in the math. Round trip doubles the entered trip distance.
fuel_used_gal = trip_distance_used_miles / adjusted_mpg
trip_cost_usd = fuel_used_gal x gas_price_usd_per_gal
cost_per_mile = gas_price_usd_per_gal / adjusted_mpg
Example:
100 one-way miles becomes 200 miles for round trip. If "Car mileage (MPG)" is 25 and "Real-world MPG adjustment (percent)" is -10, adjusted MPG is 22.5. Fuel used is 200 / 22.5 = 8.8889 gallons. At $3.50 per gallon, fuel cost is about $31.11 and cost per mile is about $0.1556.
Savings from better MPG
The calculator compares yearly gallons used at the old MPG and new MPG.
annual_fuel_saved_gal = annual_miles/old_mpg - annual_miles/new_mpg
annual_money_saved_usd = annual_fuel_saved_gal x gas_price_usd_per_gal
Example: with 12,000 miles per year, improving from 20 MPG to 30 MPG changes yearly fuel use from 600 gallons to 400 gallons. That is 200 gallons saved. At $4.00 per gallon, that is $800 saved per year.
Assumptions and limits
The calculator requires positive MPG and gallon values where they are used. Odometer distance works only when the ending reading is greater than the starting reading. If adjusted MPG becomes 0 or less after the percent adjustment, the result is invalid and should be corrected. Negative yearly savings are kept on purpose because they show added fuel use or added cost rather than true savings.