AutoMath
Running costs

MPG / Gas Mileage Calculator

Two numbers off your last tank — miles driven and gallons to refill — give you your real fuel economy, not the EPA lab estimate, plus what that mileage costs per mile and per year.

Your numbersSaved on this device only
The tank
For the cost (optional)
Real-world fuel economy

25.0 mpg

9.4 L/100km · 4.00 gal per 100 mi

What that mileage costs
At $4/gal you spend 14.4¢ per mile — $14 per 100 miles. Over 12,000 miles a year that's $1,728.
Cost per mile
14.4¢
Cost per fill
$43
Gallons / year
480 gal
Fuel / year
$1,728

What this computes

MPG is the simplest car number there is — miles divided by gallons — yet almost nobody measures their own. This does, and then turns it into the figures that matter: gallons per 100 miles, the metric L/100km, cost per mile at today's gas price, and what a full year of your driving burns in fuel.

The math

mpg              = miles driven / gallons used
gallons / 100 mi = (gallons / miles) × 100
L/100km          = 235.215 / mpg
cost per mile    = gas price / mpg
annual fuel cost = (annual miles / mpg) × gas price

MPG flatters big numbers — the jump from 10 to 20 mpg saves far more fuel than 30 to 40. That's why gallons-per-100-miles (and L/100km) exist: they scale with what you actually spend.

Going from 10 to 20 mpg saves more gas than going from 20 to 40. MPG hides that; cost per mile doesn't.

How to measure it

  1. Fill up and reset the trip odometer to zero.
  2. Drive a normal mix of your real commuting and errands — a few hundred miles.
  3. Refill the tank and read the gallons off the pump and the miles off the trip odometer.
  4. Enter both here. For a steadier number, average three or four tanks, or use total miles ÷ total gallons if you track every fill.

Why it beats the EPA number

  • The EPA tests in a lab. Your commute, climate, and right foot aren't in the cycle.
  • Real loss is 10-25%. Cold starts, short trips, highway speed, AC, and cargo all push you below the sticker.
  • Your number is the one that spends money. Budget and comparisons should use measured MPG, not the window sticker.

What this calculator doesn't model

  • Everything but fuel — depreciation, insurance, and maintenance dwarf gas in the true cost of a mile.
  • Pump cut-off variation — a single partial fill can skew one reading; average a few.
  • Seasonal swings — winter blends and cold weather lower MPG; summer raises it.
  • EVs — for electric range and charging, use the EV charging cost calculator instead.

Frequently asked questions

How do I calculate my car's MPG? +
Fill the tank and reset the trip odometer. Drive normally until you need gas again, then refill and note both the miles on the trip odometer and the gallons it took. MPG is miles ÷ gallons. Doing it across a full tank (not a partial fill) and over a few hundred miles smooths out the noise from how full the pump cuts off.
Why is my real MPG lower than the EPA sticker? +
EPA figures come from standardized lab cycles, not your commute. Cold starts, short trips, highway speeds above 65, rooftop cargo, AC, hills, towing, and aggressive acceleration all cut real economy — often 10-25% below the sticker. The sticker is useful for comparing cars to each other; your measured MPG is what actually hits your wallet.
What's a good MPG? +
It depends on the vehicle class. A modern compact sedan returns 30-40 mpg, a midsize crossover 25-30, a full-size truck or SUV 17-22, and a hybrid 45-55. Rather than chase a universal 'good' number, compare your measured MPG to your car's EPA combined rating — a big gap usually points to driving habits, tire pressure, or a maintenance issue.
How do I convert MPG to L/100km? +
Divide 235.215 by the MPG. So 25 mpg is 235.215 ÷ 25 ≈ 9.4 L/100km. Note that L/100km is an 'inverse' measure — lower is better — which is exactly why this calculator also shows gallons per 100 miles, the US version of the same idea.
Does cost per mile here include everything? +
No — this is fuel only. The cost-per-mile figure here is gas price ÷ MPG. The full cost of a mile also includes depreciation, insurance, maintenance, and fees, which usually dwarf fuel. For that all-in number, use the cost per mile calculator; for a pure trip-fuel estimate, use the fuel cost calculator.
Should I use one tank or an average of several? +
One careful full-tank measurement is fine for a quick read, but averaging three or four tanks is more reliable — it cancels out pump cut-off variation and one unusually thirsty or efficient week. If you track every fill, use your running totals: total miles ÷ total gallons.

Related calculators

  • Fuel Cost — plug your measured MPG in to price a trip or a year.
  • Cost Per Mile — fuel is one line; this adds depreciation, insurance, and the rest.
  • EV Charging Cost — the electric equivalent of MPG, in dollars per mile.
  • Gas vs Electric — once you know your real MPG, compare it to an EV.

Curious why your real MPG trails the sticker? Read your real MPG isn't the EPA number.

AutoMath is an educational tool. The numbers above depend entirely on the miles, gallons, and price you enter.