A gas mileage calculator works out your vehicle’s fuel economy in miles per gallon by dividing the miles you drove by the gallons of fuel you used. Formula: MPG = miles / gallons (gallons > 0). 300 miles on 10 gallons is 30 mpg.
On this page

How to use the gas mileage calculator
- Enter the miles driven since your last fill-up.
- Enter the gallons you added.
- Read your mpg.
What is the gas mileage formula?
Fuel economy in the United States is measured in miles per gallon (mpg). The gas mileage calculator divides the miles you drove by the gallons of fuel used:
- MPG = miles driven ÷ gallons used
- Liters per 100 km = 235.215 ÷ mpg
- Kilometers per liter = mpg × 0.425
Gas mileage calculator worked example
You drove 300 miles and refilled with 10 gallons. Your fuel economy is 300 ÷ 10 = 30 mpg, which equals about 7.8 liters per 100 km.
| MPG | L/100 km | km/L |
|---|---|---|
| 15 | 15.7 | 6.4 |
| 20 | 11.8 | 8.5 |
| 25 | 9.4 | 10.6 |
| 30 | 7.8 | 12.8 |
| 40 | 5.9 | 17.0 |
| 50 | 4.7 | 21.3 |
How to measure your mpg
- Fill the tank completely and reset the trip odometer, or note the odometer reading.
- Drive normally until the tank is at least half empty.
- Fill up again and note the gallons on the pump receipt.
- Divide the miles driven by the gallons added.
Repeat over several tanks and average the results; a single fill can be off if the pump shuts off at a different level. The dashboard mpg display is convenient but can read a few percent high or low.
Comparing with EPA ratings
FuelEconomy.gov, run by the U.S. Department of Energy and EPA, lists city, highway and combined ratings for most vehicles. Your result may differ: cold weather, short trips, heavy loads, aggressive driving, idling and roof racks all lower mileage, while steady highway driving at moderate speeds often meets or beats the rating. If your gas mileage calculator result drops suddenly, check tire pressure and look for maintenance issues.
Why small mpg gains matter most for thirsty vehicles
Fuel used is miles ÷ mpg, so gains at the low end save more fuel. Over 10,000 miles, going from 15 to 20 mpg saves about 167 gallons, while going from 40 to 50 mpg saves only 50 gallons. This is why liters per 100 km, which measures fuel used rather than distance, makes comparisons easier.
From mpg to cost
Once you know your mpg, multiply your annual miles by your price per gallon and divide by mpg to estimate yearly fuel spending. At 12,000 miles a year, 30 mpg and $4.284 a gallon, that is about $1,714.
Getting better mileage
Simple habits raise mpg. Keep tires at the pressure on the door-jamb sticker, remove extra weight, avoid long idling and use cruise control on the highway. Speed matters most on long trips: fuel economy usually falls quickly above about 50 mph, so a few miles per hour slower can noticeably cut fuel use. Track each fill-up with the gas mileage calculator for a month before and after a change to see how much it really helps.
Keeping a fuel log
A simple fuel log makes trends easy to spot. For each fill-up, write the date, odometer reading, gallons and price. Subtract the previous odometer reading to get the miles, and run the numbers through the gas mileage calculator. Over a year, you will see the seasonal pattern: mileage is usually lower in winter, when engines take longer to warm up, winter-blend fuel is used and tires lose pressure. A drop that lasts more than a couple of tanks, without a change in season or driving, is worth a maintenance check.
The log also gives you your real cost per mile. Divide the money spent on fuel by the miles driven: at 30 mpg and $4.284 a gallon, fuel costs about 14 cents a mile. That figure is useful for comparing commuting options or estimating the cost of a trip.
Related converters and calculators
Related calculators:
- Fuel cost calculator: trip cost
- Unit converter: units
- Speed calculator: speed
- Auto loan calculator: car loans
Sources
U.S. DOE/EPA FuelEconomy.gov: Fuel economy information.
Questions about this calculator
How do I calculate mpg?
Divide miles driven by gallons used.
How do I convert mpg to L/100 km?
Divide 235.215 by mpg.
Why is my mpg lower than the EPA rating?
Weather, short trips, load and driving style.
How many tanks should I measure?
Several, then average.
Is 30 mpg good?
It depends on the vehicle class; compare at FuelEconomy.gov.
Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.
Report a calculation issue