Gas Mileage Tracker

How to calculate gas mileage

It is one division. Everything that makes people's numbers wrong happens before the division, in how the two fill-ups were done.

Updated September 2026

The full-tank method

Your car has no fuel meter. It has a level float in the tank and a computer that guesses at consumption from injector timing. Neither can tell you how much fuel you burned. The pump can, because it charged you for it.

So the method is to make the tank the measuring cup, by starting and ending at the same level. Full is the only level you can reliably hit twice.

  1. Fill the tank until the pump clicks off. Stop there. Do not squeeze in another dollar.
  2. Note the odometer, or reset the trip meter to zero.
  3. Drive normally. Do not drive gently for the test. You want the number for how you actually drive.
  4. Fill up again the same way, ideally at the same pump, and stop at the first click again.
  5. Take the gallons off the pump display, and the odometer reading.
  6. Divide the miles by the gallons.

That is the whole thing. There is no version of this that works without two full tanks, which is why the answer to "how do I calculate MPG from one fill-up" is that you cannot.

The formula

MPG = miles driven ÷ gallons added

Gallons added at the second fill-up, not the first.

That footnote is the one that gets people. The fuel you put in at the end is precisely the fuel that replaced what the trip burned. The fuel you put in at the start belongs to the tank before this one.

Worked example

Three consecutive fill-ups, so you can see how the running average behaves.

Fill-upOdometerMilesGallonsMPG
1 (start)42,150--12.1--
242,46231211.626.9
342,80133911.230.3
443,09028911.924.3

The first fill-up produces no MPG figure, because there is no distance behind it yet. From then on each tank gets its own.

The running average is not the average of 26.9, 30.3 and 24.3. It is total miles divided by total gallons: (312 + 339 + 289) ÷ (11.6 + 11.2 + 11.9) = 940 ÷ 34.7 = 27.1 MPG. Averaging the three MPG figures gives 27.2, which is close here and drifts badly once tank sizes vary. Always go back to total miles over total gallons.

Look at the spread: 24.3 to 30.3 on the same car in three weeks. Tank 3 was a motorway trip. Tank 4 was a cold snap and school runs. Neither is a fault. This is why one measurement tells you almost nothing.

Doing it in litres

The method is identical. Only the arithmetic at the end changes.

L/100 km = (litres ÷ kilometres) × 100

Lower is better, which is the opposite of MPG.

42 litres over 520 km is (42 ÷ 520) × 100 = 8.1 L/100 km. If you want km per litre instead, it is just 520 ÷ 42 = 12.4 km/L.

One warning for anyone comparing across borders: British MPG figures are imperial gallons, which are 20 percent bigger than US gallons. A UK car quoted at 45 MPG gets 37.5 MPG by American reckoning. The calculator handles all of these so you do not have to keep the factors in your head.

Four mistakes that produce wrong numbers

1. Using the first fill-up's gallons

Covered above, and worth repeating because it is the most common. The gallons belong to the end of the trip, not the start.

2. Inconsistent topping off

Stopping at the click one week and squeezing in another litre the next produces a saw-tooth pattern in your results that looks like the engine is going wrong. It is not. It is the nozzle.

3. Including partial fill-ups

A twenty dollar splash of fuel is a purchase, not a measurement. Record it for spending if you like, but exclude it from the MPG maths. A decent tracker asks you to mark it and takes care of that; done by hand in a spreadsheet, it silently poisons the average.

4. Judging the car on one tank

Cold weather alone costs most petrol cars 10 to 20 percent, because the engine spends longer warming up and winter fuel has slightly less energy in it. If you measure once in January you have measured January, not the car.

What to do with the number

One MPG figure is trivia. A run of them is a diagnostic. Once you have five or six tanks, the average is stable enough that a real change stands out against the noise.

What you seeUsual cause
Gradual decline over monthsTyre pressure drifting down, air filter loading up, or just winter arriving
Sudden drop of 10 to 15%Dragging brake, failing oxygen sensor, roof rack left on, or a big tyre change
One bad tank, then normalTraffic, a hilly trip, a cold week, or a mis-measured fill-up
Steady improvementYou changed how you drive, and it worked
Wild swings tank to tankInconsistent filling, not the car

That table is the actual argument for logging fill-ups rather than calculating one now and then. You cannot spot a 12 percent decline against a background you never recorded.

Questions people actually ask

How many miles should I drive before calculating? +
A full tank, or at least 200 miles. Short samples magnify every error. If you misread the pump by half a gallon over 60 miles, the answer is nonsense. Over 350 miles, the same error barely moves it.
Can I work out MPG from a single fill-up? +
Only if you know how far you drove since the last time the tank was full. Without a starting point at a known fuel level, there is no distance to divide by, so the number has no meaning.
Should I reset the trip meter instead of using the odometer? +
Either works. The trip meter saves you a subtraction, the odometer survives someone else resetting the trip meter. Use whichever you will not forget.
Does the fuel gauge help? +
No. Fuel gauges are non-linear and deliberately pessimistic near empty. The needle sitting at half does not mean half a tank. Only the pump knows how much fuel went in.
How do I calculate fuel consumption in L/100 km? +
Litres put in, divided by kilometres driven, times 100. If you put in 42 litres after 520 km, that is (42 / 520) x 100 = 8.1 L/100 km. Unlike MPG, a lower figure is better.
Why is my calculated MPG lower than the EPA rating? +
EPA figures come from a standardised test cycle: no roof box, moderate acceleration, mild temperature, no idling in a school pickup line. Most drivers land 10 to 20 percent below the combined figure, and that is normal, not a fault.

Keep going

The calculator is the one-off. The app is the habit.

A calculator tells you what one tank did. Log every fill-up and you get the trend: the month your MPG dropped, the station that is quietly more expensive, and what the car really costs you per mile.

  • Odometer, gallons, price. That is the whole form.
  • MPG per tank and a running average, calculated the tank-to-tank way
  • Charts for MPG, monthly spend and the price you have been paying per gallon
  • Several vehicles, and a CSV export when the accountant asks
Download Gas Mileage Tracker

Free on the App Store. Android version in the works.

Last tank

28.4 MPG

Average

26.9

Cost per mile

$0.13

This month

$187

Fill-ups

42