One tank, one odometer interval

MPG Calculator

Miles per gallon is the trip divided by the fuel. Drive 300 miles and add 10 gallons and the car did 30 mpg on that interval. If you type a price per gallon, cost per mile is that price divided by the mpg. The method only works when the tank is filled to the same point both times, so the gallons match the miles.

Fill to the same mark both times, or the gallons are not the fuel you used.

Miles per gallon

30.00

Worked examples

300 miles on 10 gallons

30 mpg. At $3 a gallon that is $0.10 a mile.

30.00 · ≈ $0.100

A shorter city tank

120 miles on 8 gallons, no price.

15.00

Miles over gallons

  1. MPG = miles ÷ gallons.
  2. If a price per gallon is present and mpg is above 0, cost per mile = price ÷ mpg.

Good for

  • A tank you filled twice to the same mark
  • Comparing a highway tank with a city tank on the same car
  • Turning a pump price into dollars per mile after you know the mpg

Common mistakes

  • Dividing gallons by miles and calling that mpg
  • Including miles driven on fuel that was already in the tank before the first fill
  • Typing the total receipt instead of the price per gallon

Frequently asked questions

Why fill to the same mark?

The gallons you buy are supposed to replace the gallons you burned. If the first fill stopped early and the second fill buried the nozzle, those gallons do not match the miles.

What about liters and kilometers?

This page is miles and US gallons. Convert before you type, or the number is not mpg.

Does the trip computer match?

It might not. The computer estimates. This ratio is only as good as the odometer and the pump. A 0 mile entry makes mpg 0 and hides the cost line.

Is cost per mile the whole cost of the car?

No. It is fuel only, and only if the price you typed is the price per gallon, not the receipt total.

Sources and updates

Last reviewed .

  • Miles per gallon – mpg = miles / gallons. Cost per mile = price per gallon / mpg. No EPA table.

Related calculators