CompoundPage

Gas Mileage Calculator

342 miles on 11.6 gallons is 29.48 MPG, or 7.98 L/100km. The gas mileage calculator works out MPG from the trip meter and the pump receipt, and what that mileage costs over a year.

Trip cost uses the fuel economy fields and ignores fuel used. Gas mileage works the economy out from the distance and the fuel used, and ignores the economy fields. Gas money uses the economy fields and splits the trip's cost with the fields at the end.

Used in gas mileage mode only: the fuel on the receipt at the fill-up that ends the distance above.

Used in gas mileage mode only. The fuel price is then read per this unit.

Per gallon or per liter, matching the economy unit you picked.

In the same unit as the fuel economy.

Shared in the same proportions as the fuel.

Optional. The distance each rider was in the car, separated by commas, in the trip's distance unit. Riders not listed ride the whole trip.

Gas mileage29.48 MPG

MPG (US) 342 miles on 11.6 US gallons.
29.48 MPG
MPG (imperial) For comparing with UK or older Canadian figures.
35.41 MPG
Liters per 100 km
7.98 L/100km
Kilometers per liter
12.53 km/L
Gallons per 100 miles
3.39 gal
Cost of this tankful 11.6 US gallons at $3.45 a gallon.
$40.02
Cost per mile
$0.12
Cost per km
$0.07
Annual fuel cost 12,000 miles a year at this mileage is 407 US gallons.
$1,404.21
A year of fuel at mileage either side of yours, 12,000 miles
MPG (US)Gallons a yearCost a yearvs yours
19.5616$2,124.96+$720.75
24.5490$1,690.99+$286.78
29.5 (yours)407$1,404.21-
34.5348$1,200.60-$203.61
39.5304$1,048.56-$355.65

How the Fuel Cost Calculator works

Gas mileage is miles driven divided by gallons used. The division is the easy part. The measurement is where the figure goes wrong, and a number worked out carefully from the pump is the only one that reflects your car, your roads and your driving. It works the same way as a fuel mileage calculator for diesel.

The reliable way to measure it is the fill-up method. Fill the tank until the pump clicks off, and reset the trip meter. Drive normally until you need fuel. Fill again, ideally at the same pump, and stop at the first click rather than topping off. The miles on the trip meter and the gallons on the second receipt are the two inputs. The first fill-up does not count: it only sets a known starting level, and the second fill measures exactly what was burned since. Topping off spoils this because how much more fits after the click varies from pump to pump, so the two fills stop being the same level.

One tank is a noisy sample. A cold week, a long highway run or a tank of short trips can move the figure by a lot, so a better number comes from several tanks: add up the miles and add up the gallons over all of them, then divide once.

Add your price per gallon and it doubles as a gas cost calculator. The last thing worth knowing is that MPG is not linear in the fuel you burn. Fuel used is distance divided by MPG, so each extra mile per gallon saves less than the one before it. At 12,000 miles a year and $3.45 a gallon, the 29.48 MPG car burns about 407 gallons. Losing 5 MPG, to 24.5, adds about $287 a year; gaining 5, to 34.5, saves only about $204. Gallons per 100 miles and liters per 100 km are the versions that are linear: halve them and you halve the fuel bill, which is why US fuel labels print gallons per 100 miles beside MPG.

Fuel Cost Calculator FAQ

How do I calculate my gas mileage?

Fill the tank to the first click and reset the trip meter. At the next fill-up, again to the first click, divide the miles on the trip meter by the gallons on the receipt. 342 miles on 11.6 gallons is 29.48 MPG.

Why is my dashboard MPG different from what I calculate?

The dashboard estimates fuel from injector timing and distance from wheel speed, and both can be a few percent off; tire size and wear change the distance reading. The fill-up figure measures the fuel that actually went into the tank, so when the two disagree it is the one to use.

How do I average gas mileage over several tanks?

Add the miles from every tank and the gallons from every tank, then divide the totals. Averaging the MPG figures of individual tanks gives the wrong answer, usually too high, because MPG has fuel in the denominator: 30 MPG and 20 MPG over equal distances average to 24 MPG, not 25.

Why does a few MPG matter more on a thirsty car?

Fuel used is distance divided by MPG, so the curve flattens as MPG rises. Over 12,000 miles, going from 20 to 25 MPG saves 120 gallons; going from 35 to 40 saves about 43. Measure in gallons per 100 miles or liters per 100 km and equal steps are equal savings.

More from the Fuel Cost Calculator

Related calculators

Embed this calculator
<div id="compoundpage-fuel-cost-calculator"></div>
<script src="https://compoundpage.com/embed/fuel-cost-calculator.js" async></script>

The same calculation as JSON