How to calculate MPG
To calculate MPG, fill the tank, reset the trip odometer, drive normally, then refill and divide the miles by the gallons it took to refill. That is the method the EPA's fueleconomy.gov recommends for checking your own mileage, and it is what this MPG calculator does.[3]
- Fill the tank until the pump clicks off and note the odometer, or zero the trip meter.
- Drive as you usually do, ideally until the tank is at least half empty, so small differences at the pump matter less.
- Refill to the same click-off point and write down the gallons from the receipt.
- Divide: miles driven ÷ gallons added = miles per gallon.
Example: 342 miles ÷ 11.4 gallons = 30.0 mpg. Averaging three or four tanks gives a steadier number, because a single fill-up can stop at a slightly different level. California drivers can compare with the average cost of gas in California, and every region is on average cost of gas.
Gas mileage calculator in metric: L/100 km and km/L
Outside the United States fuel economy is usually given as liters per 100 kilometers, where a lower number is better, or kilometers per liter. One US gallon is 3.785411784 liters and one mile is 1.609344 kilometers, so L/100 km = 235.215 ÷ mpg.[6] Switch the calculator to kilometers and liters to enter metric readings directly.
| MPG | L/100 km | km/L | Cost per 100 miles at $4.00 |
|---|---|---|---|
| 15 mpg | 15.7 | 6.4 | $26.63 |
| 20 mpg | 11.8 | 8.5 | $19.98 |
| 25 mpg | 9.4 | 10.6 | $15.98 |
| 30 mpg | 7.8 | 12.8 | $13.32 |
| 35 mpg | 6.7 | 14.9 | $11.41 |
| 40 mpg | 5.9 | 17.0 | $9.99 |
| 50 mpg | 4.7 | 21.3 | $7.99 |
The same distance costs far more in a 15 mpg truck than a 40 mpg hybrid: $3,196 vs. $1,199 a year for 12,000 miles at today's average price. The gas cost calculator prices a specific trip, and the cost of owning a car calculator adds fuel to insurance, depreciation and the rest.
Why your MPG differs from the window sticker
Your measured mpg will rarely match the label exactly. The EPA label combines city and highway results weighted 55% city and 45% highway, and the tests are adjusted to reflect real driving, but your speed, climate, cargo, tire pressure and trip length all move the result.[2] Fueleconomy.gov notes that aggressive driving (speeding, rapid acceleration and braking) wastes gas,[3] and that in cold weather a conventional gasoline car can lose 10% to 20% of its city fuel economy and 15% to 33% on short trips.[4]
- Speed. Mileage usually drops quickly above about 50 mph, because drag rises with speed.[3]
- Cold weather and short trips. A cold engine burns more fuel per mile until it warms up.[4]
- Load and roof cargo. Extra weight and a roof-top cargo box both cost mpg; fueleconomy.gov estimates a large box can cut fuel economy by 10% to 25% at Interstate speeds.[3]
The EPA's latest Automotive Trends Report puts the estimated real-world fuel economy of new vehicles at 27.2 mpg for model year 2024.[1] If your car sits well below its own label for several tanks, a check of tire pressure, the air filter and the brakes is cheaper than the fuel you are losing.
Turn MPG into cost per mile
Cost per mile for fuel is the price per gallon divided by mpg. At $3.995, the U.S. average for regular in the week of November 9, 2026,[5] a 30.0 mpg car spends 13.3 cents a mile, or $13.32 per 100 miles. Multiply by the miles you drive in a year to budget fuel: 12,000 miles at that rate is $1,598.
Electric and plug-in carsEPA labels for electric vehicles show MPGe and kilowatt-hours per 100 miles. To compare running costs with a gas car, multiply kWh per 100 miles by your electricity rate and set it against the gas cost per 100 miles from this calculator.
Common mistakes when you calculate gas mileage
- Using the tank size instead of the gallons added. Only the fuel you put back in measures what you burned.
- Stopping at different click-offs. Topping off one time and not the next skews a single reading by a gallon or more.
- Trusting the dashboard average. Trip computers estimate fuel use from engine data; the gallons on the pump receipt are what you actually bought.
- Mixing liters and gallons. A US gallon (3.785 L) is smaller than an imperial gallon (4.546 L), so UK mpg figures are about 20% higher for the same car.[6]
Frequently asked questions
How do you calculate MPG?
Divide the miles you drove by the gallons it took to refill the tank. 342 miles on 11.4 gallons is 30.0 mpg.
How do I convert L/100 km to mpg?
Divide 235.215 by the L/100 km figure. 8 L/100 km is 29.4 mpg (US); 5 L/100 km is 47.0 mpg. The conversion works the same way in reverse.
What is good gas mileage?
It depends on the vehicle type. The EPA estimates the average new vehicle of model year 2024 gets 27.2 mpg in real-world driving; compact cars and hybrids beat that easily, while large pickups and SUVs fall below it.[1]
Is a gas mileage calculator the same as the car’s trip computer?
No. The trip computer estimates fuel flow from the engine; this calculator uses the fuel you actually bought, which is more accurate over several tanks.