How to Calculate MPG: The Formula, the Traps, and Your Real Number (2026)

Filling up at a gas pump — the pump total and the trip odometer are the two numbers needed to calculate MPG

Everyone thinks they know how to calculate MPG — miles divided by gallons, done. The formula really is that simple. What isn’t simple is getting a number that means anything: fill up to a different level than last time and you can be off by three or four miles per gallon, which is the difference between “this car is fine” and “something is wrong with this car”.

I build Magica, a mileage and vehicle app, so I spend a lot of time looking at refueling data people actually record. The pattern is always the same — the arithmetic is never the problem, the measurement is. Here is the formula, the fill-up discipline that makes it accurate, why the number on your dashboard disagrees with it, and how to tell whether your result is good.

The formula, and the only two numbers that matter

Miles per gallon is a ratio between distance covered and fuel burned to cover it:

MPG = miles driven ÷ gallons used

Everything else is about measuring those two numbers honestly.

The miles are easy: the trip odometer, or the difference between two total-odometer readings. The gallons are where people go wrong, because you cannot see how much fuel is in the tank. The fuel gauge is a float, not a measuring cup, and “about half” is not a quantity.

The trick that solves it is the one every accurate method is built on: you don’t measure the fuel in the tank, you measure the fuel you put back in. If the tank was full when you started and it’s full again now, then the gallons the pump just delivered are exactly the gallons you burned in between. The pump is a certified meter reading to a hundredth of a gallon. Your fuel gauge is not.

Worked example, with real numbers off a receipt:

  • Trip odometer at the second fill-up: 342.6 miles
  • Gallons delivered by the pump: 12.418
  • 342.6 ÷ 12.418 = 27.6 MPG

That is the whole calculation. The rest of this article is about making those two numbers trustworthy.

The tank-to-tank method, step by step

  1. Fill the tank completely. Let the nozzle click off on its own and stop there. Don’t top off, don’t round up to a dollar amount, don’t squeeze in an extra splash. The automatic click is your reference level, and it’s repeatable.
  2. Reset the trip odometer. Do it standing at the pump, before you drive off. If you reset it three blocks later, those blocks are free miles that inflate the result. No trip meter? Write down the total odometer reading instead.
  3. Drive normally. Don’t hypermile for the measurement week — you’ll get a number that describes a driver who isn’t you.
  4. Refill when the tank is low, the same way as step 1. Same pump click, and ideally the same station and pump, because nozzle shut-off points vary slightly between pumps.
  5. Read the gallons off the pump display, not the dollars. That figure is the fuel you consumed.
  6. Divide the miles by the gallons. That’s your MPG for that tank.

One quiet detail: the number you just got is *this tank*, not *your car*. A tank driven in January with winter fuel, a cold engine and a roof box is a different measurement from the same car in June. Which brings up the part almost everyone gets wrong.

Don’t average your averages

Once you have three or four tanks, the instinct is to average the MPG figures. That produces a slightly wrong number, and it’s worth thirty seconds to understand why.

Say you drive a 600-mile highway stretch at 35 MPG (17.14 gallons), then a 90-mile week of city errands at 18 MPG (5.0 gallons). Average the two results and you get 26.5 MPG. Add up what actually happened — 690 miles on 22.14 gallons — and you get 31.2 MPG. Nearly five miles per gallon apart, from the same two tanks.

The averaged figure is wrong because it treats the 90-mile tank as equally important as the 600-mile one. Your car burned fuel in proportion to the miles, not in proportion to the number of times you stopped at a pump.

The correct way to combine tanks is to add up the raw ingredients:

Overall MPG = (total miles across all tanks) ÷ (total gallons across all tanks)

Keep a running total instead of a list of results. It’s the same discipline that makes a car maintenance log worth keeping: record the raw facts, derive the summary later, never the other way round.

Why your dashboard MPG disagrees with your math

Your car shows a fuel economy figure and it rarely matches the pump arithmetic. That readout isn’t measuring fuel either — it’s estimating, from how long the injectors stay open, airflow, speed, and assumptions baked into the software.

How far off is it? AAA tested this properly in 2021: model year 2018–2020 vehicles on a dynamometer, seven drive cycles run four times each. The findings:

“On average, the fuel economy display of the vehicles tested showed an error of 2.3% (0.7 mpg) as compared to their lab-measured fuel economy from start to finish of testing.”

“Though the average error was relatively low, results varied significantly by vehicle, with individual vehicle error ranging from –6.4% (–2.2 mpg) to 2.8% (+0.9 mpg) for the cumulative miles per gallon. Note: a negative value indicates fuel economy was overestimated.”

So on average the displays are decent, but the spread matters more than the average: the worst car in the test overstated its own economy by 6.4%, and the report also notes that error “varied significantly over short distances, even when accurate over longer distances”, and that the estimate “will likely lose accuracy until it adjusts” when driving conditions change. (AAA — Accuracy of In-Dash Fuel Economy Displays)

Practical reading: the dashboard is a good *trend* instrument — it will tell you honestly that this week was worse than last week. It is not a measurement. When the number is going to decide something — buying a car, comparing two vehicles, backing up an expense claim, diagnosing a suspected problem — use the pump.

The same logic applies to the window-sticker rating. The EPA is direct about it: the ratings “are a useful tool for comparing the fuel economies of different vehicles but may not accurately predict the average MPG you will get” (fueleconomy.gov). They’re a standardized test, and you don’t drive a standardized test.

The mistakes that produce a fake number

  • Inconsistent fill level. The single biggest error source. Clicking off automatically one time and hand-squeezing an extra half gallon the next can swing a 12-gallon tank by 4%.
  • Measuring on a partial fill. If you only put in 8 gallons on a tank that wasn’t empty, you have no idea what level you started from. Partial fills are fine for logging cost; they are useless for a single-tank MPG.
  • Resetting the trip meter late — or forgetting entirely and estimating the miles. An estimated numerator makes the whole ratio decorative.
  • Judging the car on one tank. Cold weather, short trips, a roof rack, low tire pressure, an unusually heavy load, or one long highway run can move a single tank by 15–20%.
  • Comparing across fuels or measurement systems. A UK “MPG” is not a U.S. MPG (see below), and a figure in L/100 km moves in the opposite direction.
  • Using the number from a rental or a car you just bought. The first tank tells you about the previous driver and the fill level you inherited, not about the car.

What counts as good MPG in 2026

There’s a real benchmark for this. The EPA’s Automotive Trends Report puts the average real-world fuel economy of new vehicles at a record high 27.2 MPG for model year 2024 (EPA — Highlights of the Automotive Trends Report). That’s the whole fleet, sedans and pickups together, and it includes the pull from electric and plug-in hybrid models.

Treat it as a reference point, not a target, because the fleet average hides enormous spread by body type — truck SUVs averaged 25.7 MPG in that same model year. A midsize sedan returning 27 MPG is unremarkable; a full-size pickup returning 27 MPG is excellent; a compact hybrid returning 27 MPG has something wrong with it.

The benchmark that actually tells you something is your own car, six months ago. A vehicle that used to do 31 and now does 26 with the same commute is telling you about tire pressure, a dragging brake, a clogged filter, a failing sensor or a change in driving pattern — and that’s exactly the kind of drift a proper maintenance history helps you explain. If the drop is sudden rather than gradual, it’s usually mechanical.

MPG is not cost per mile

MPG measures fuel efficiency. It says nothing about depreciation, insurance, tires, servicing or the price of fuel itself — and those are most of what a car costs.

Two examples make the gap obvious. A car doing 38 MPG on premium gasoline can cost more per mile in fuel alone than one doing 32 MPG on regular. And a famously efficient car with expensive parts and short service intervals can easily lose to a thirstier one over five years.

So track both, and use them for different questions. MPG answers “is this car burning more fuel than it should?”. Cost per mile answers “what is this car actually costing me?”. If you want to push the first number in the right direction, most of the gains are boring and real: tire pressure, weight, speed, and smoothness — the fuel-saving basics are worth more than any additive.

Gallons aren’t all the same: U.S., Imperial and L/100 km

Three units, three different traps:

  • A U.S. gallon is 3.785 liters. An Imperial gallon (still used in the United Kingdom) is 4.546 liters — about 20% bigger. A British review quoting “45 MPG” is describing roughly 37 U.S. MPG for the same car. Every cross-Atlantic comparison of fuel economy is wrong unless the units are checked first.
  • L/100 km, used across Europe, is the same information inverted: it counts fuel per fixed distance, so lower is better. Converting is one division: `L/100 km = 235.215 ÷ MPG` — and the same formula works in reverse.
MPG (U.S.)L/100 km
2011.8
259.4
307.8
356.7
405.9
504.7

Notice that the L/100 km column shrinks fast at the bottom and slowly at the top: going from 20 to 25 MPG saves far more fuel over the same distance than going from 40 to 50. That asymmetry is invisible in MPG, and it’s the reason replacing the thirstiest car in a household matters more than upgrading the efficient one.

How I track it in Magica

Doing this by hand for one tank is easy. Doing it for two years, across two cars, without the notebook going missing, is where it falls apart. That’s the part the app handles:

  • Refuel log. Date, odometer, volume, price, full or partial fill, on the vehicle it belongs to. Gasoline and EV charging both.
  • Efficiency calculated from the entries, not guessed — average consumption and the trend over time, so a slow drift shows up as a slope instead of a surprise.
  • Your units. MPG or L/100 km, gallons or liters, set once and applied everywhere.
  • Voice entry. “Twelve gallons, forty-one dollars” at the pump takes ten seconds, which is the only moment you’ll reliably do it.
  • Receipt capture, so the pump total and the log entry are the same object.
  • Export to CSV or PDF when you need the history somewhere else — a buyer, an accountant, a spreadsheet of your own.
  • On device. The fuel history is encrypted on the phone and backed up to your own iCloud, synced between iOS and Android. There’s no Magica server holding it, which is the same principle behind how the app treats trip data.

Honest limitation: an app cannot fix a bad measurement. If a partial fill gets logged as a full one, the math is clean and the answer is still wrong. Mark partial fills as partial — that’s what the flag is for — and let the full-to-full tanks carry the calculation.

Try Magica for Free

Download the app and start automatically tracking your business trips. No credit card required.

Download Now
Try Magica for Free

Frequently asked questions

What is the formula to calculate MPG?

Miles driven divided by gallons used. The reliable way to get the gallons is to fill the tank, reset the trip odometer, drive, then refill to the same level: the gallons the pump delivers are exactly the gallons burned. 342.6 miles on 12.418 gallons is 27.6 MPG.

How many miles should I drive before calculating MPG?

At least most of a tank — a couple of hundred miles for a typical car. Shorter runs magnify every small error in fill level. For a figure that describes your car rather than your week, combine three to five tanks by adding all the miles and all the gallons, then dividing once.

Why is my calculated MPG lower than the EPA rating?

Because the rating comes from a standardized lab test. The EPA says its ratings are useful for comparing vehicles but “may not accurately predict the average MPG you will get”. Short trips, cold starts, high speeds, roof racks, heavy loads, low tire pressure and aggressive acceleration all push real-world numbers below the sticker.

Can I trust the MPG shown on my dashboard?

As a trend, yes. As a measurement, be careful. In AAA’s dynamometer testing the displays averaged 2.3% error, but individual vehicles ranged from 0.0% to 6.4% off, and accuracy degraded over short distances and after a change in driving conditions. When the number matters, calculate it from the pump.

How do I convert MPG to L/100 km?

Divide 235.215 by the MPG figure. 30 MPG is 7.8 L/100 km; 40 MPG is 5.9. The same formula converts back. Remember that the two scales run in opposite directions — a higher MPG is better, a higher L/100 km is worse.

Does it matter whether the tank is full or half full?

Only through the fill level at the start and end of the measurement, and those have to match. The weight of the fuel itself barely registers: gasoline runs about 6 pounds per gallon, so a full 15-gallon tank is roughly 90 pounds — half a passenger, and you don’t recalculate your MPG when a friend gets in the car.

Do I need MPG for a mileage tax deduction?

No, and it’s a common mix-up. The IRS standard mileage rate is applied to miles, so fuel efficiency never enters the calculation — see the 2026 rates. Fuel receipts matter only under the actual expense method, where you deduct real costs instead. MPG is a diagnostic for the car, not a tax input.

2 commenti su “How to Calculate MPG: The Formula, the Traps, and Your Real Number (2026)

I commenti sono chiusi.