Everyday life · Fuel economy

MPG Calculator

Measure miles per gallon from the miles you drove and the U.S. gallons it took to refill. The result also shows gallons per 100 miles, and — only if you enter the price you paid — the cost per mile.

Fill-up interval

mi
Miles driven between the two fill-ups.
gal
U.S. gallons added at the second fill-up.
/gal
Optional. Enter the price you paid per U.S. gallon to see cost per mile.

Distance and gallons must describe the same fill-up interval. The price is one you supply, not a live market price.

Calculated in your browser.
Fuel economy

30.0 MPG

300 mi ÷ 10 gal · from the distance and gallons you entered

Distance driven300 miTrip meter or odometer difference
Gallons used10 galU.S. gallons from the pump
Gallons per 100 miles3.33 gal100 mi ÷ 30.0 MPG
Cost per mileNot calculatedEnter a gas price to add cost per mile.
Calculation300 mi ÷ 10 gal = 30.0 MPG100 mi ÷ 30.0 MPG = 3.33 gal per 100 miNo price entered, so cost per mile and cost per 100 miles are left out. MPG and gallons per 100 miles use the entries only.

A single fill-up is a sample, not a rating. Fuel prices and driving conditions are inputs you supply: the price is yours, and conditions affect the MPG you enter. Tank size is not an input and does not change the fuel burned. This is not an official EPA rating.

Two measurements, one division

How the MPG calculator works

Miles per gallon answers one question: how far did the vehicle travel on each U.S. gallon of fuel it burned? The calculator needs the distance driven and the gallons added at the refill that replaced that fuel. It divides the first by the second. There is no separate correction for vehicle size, fuel type, or driving style, because those effects are already inside the two measurements.

Both numbers must cover the same interval. Record the odometer or reset the trip meter at a full tank, then refill to full at the end and use those gallons. A fill-up that is not full breaks the match: the pump adds less fuel than the engine burned, and the resulting MPG comes out too high.

The gas price is optional. Leave it blank and the tool reports economy only. Enter the price you paid and it adds cost per mile, cost per 100 miles, and the fuel cost for the distance you entered. The page never fills in a price, because fuel prices differ by station, state, and date, and it does not look up an official EPA rating.

FormulasMPG = miles driven ÷ U.S. gallons usedgallons per 100 miles = 100 ÷ MPGcost per mile = price per U.S. gallon ÷ MPGcost per 100 miles = gallons per 100 miles × price per U.S. gallon

Formula and a worked example

The page opens with 300 miles driven and 10 U.S. gallons used. Dividing gives 30.0 MPG. Gallons per 100 miles is the inverse of that figure scaled to 100 miles: 100 ÷ 30 = 3.33, so the vehicle burns about a third of a gallon every 10 miles.

Worked example300 mi ÷ 10 gal = 30.0 MPG100 mi ÷ 30.0 MPG = 3.33 gal per 100 miAt $3.50/gal: $3.50 ÷ 30.0 MPG = $0.117 per mile10 gal × $3.50/gal = $35.00 for the 300 mi

The price line is not part of the MPG result; it is an extra calculation from the price you supply. With the field blank, the panel shows only the distance, gallons, and gallons per 100 miles.

Fill-up intervalMPG · gal/100 mi · cost per mile at $3.50/gal
300 mi ÷ 10 gal30.0 MPG · 3.33 gal · $0.117/mi
330 mi ÷ 12 gal27.5 MPG · 3.64 gal · $0.127/mi
210 mi ÷ 7.5 gal28.0 MPG · 3.57 gal · $0.125/mi
500 mi ÷ 10 gal50.0 MPG · 2.00 gal · $0.07/mi

Every row uses the same $3.50 price so the cost column can be compared directly. It is an arithmetic example, not a price you should expect at the pump.

How to measure the distance and gallons

A reliable MPG reading comes from the full-to-full method. The steps are short, but each one removes a source of error:

  1. Fill the tank until the pump shuts off automatically, and do not top off after the shut-off. Record the odometer or reset the trip meter.
  2. Drive normally through the tank instead of saving the measurement for a highway run.
  3. Refill at the same station and, if possible, the same pump, again stopping at the first automatic shut-off. Record the gallons shown on the pump.
  4. Read the ending odometer or trip meter, then subtract the starting reading to get the miles driven. Divide by the gallons.

The trip meter and the odometer should agree on the distance. If they do not, one of the two readings was recorded after the vehicle had moved, and the difference can be larger than the rounding on a single tank. A partial fill is the other common mistake: adding $20 of fuel without filling the tank means the gallons no longer match the miles.

Do not read gallons from the fuel gauge. Tank shape and gauge non-linearity mean that “half a tank” is rarely half the usable capacity, and the gauge is not precise enough for a division. A pump receipt gives the only volume that matters.

Gallons per 100 miles and cost per mile

MPG measures distance per gallon; gallons per 100 miles measures fuel per fixed distance. The second figure is the one that adds up linearly. At 30 MPG a vehicle uses 3.33 gallons per 100 miles, at 20 MPG it uses 5.00, and at 50 MPG it uses 2.00. Improving from 20 to 25 MPG removes a full gallon per 100 miles, while improving from 40 to 50 MPG removes only half a gallon — even though the second change is the larger jump in MPG.

That is why trading a low-MPG vehicle for a moderately better one can save more fuel than a similar percentage gain on an already efficient car. It is also why the gallons-per-100-miles row is worth reading next to the MPG headline instead of treating MPG as a linear score.

Cost per mile follows the same logic with a price attached. At $3.50 per gallon, 30 MPG costs $0.117 per mile and $11.67 per 100 miles. Enter the price from your last fill-up if you want the figure to match what you actually paid; the calculator does not supply or refresh a price. Sales tax is normally included in the posted pump price, while tolls, parking, insurance, and maintenance are not part of a fuel-only cost.

Input limits and what is excluded

All volumes are U.S. gallons. A U.S. gallon is 231 cubic inches, or exactly 3.785411784 liters, while an imperial gallon is 4.54609 liters. The difference matters: 10 imperial gallons is 12.01 U.S. gallons, so entering imperial gallons in a U.S.-gallon field overstates MPG by about 20%. Convert before entering a non-U.S. fill-up.

  • Distance must be greater than zero and no more than 100,000 miles.
  • Gallons must be greater than zero and no more than 10,000 U.S. gallons.
  • Gas price is optional. If entered, it must be greater than $0 and no more than $100 per gallon.
  • Empty, non-numeric, zero, and negative entries are rejected with a message on the affected field. An empty price hides the cost rows instead of assuming a price.
  • The result is one interval's arithmetic. There is no city/highway split, no tank-size or fuel-gauge input, no trip-computer or telematics data, and no emissions or CO2 estimate.
  • Liters, imperial gallons, kilometers, and km/L are not converted, and no currency other than U.S. dollars is supported.
  • The number is not an official U.S. EPA rating, and one tank is not a representative average. Treat it as an estimate of the interval you measured.

To turn the MPG figure into the cost of a specific drive, open the Fuel Cost Calculator and add the trip distance, this MPG, and the price per gallon. If your fill-up was recorded in liters, the Gallons to Liters Calculator handles the volume conversion in the other direction.

MPG calculator FAQs

Do I need two fill-ups to use this calculator?

You need a full tank at the start of the interval and a full tank at the end. The first fill sets a known starting level, and the gallons you add at the second fill replace exactly the fuel burned over the miles in between. If the tank is only part full at the start, the fuel already in it is unknown, so the gallons added at the next stop cannot be compared with the miles driven.

How do you calculate or find MPG?

Divide the miles driven by the U.S. gallons used during the same full-to-full interval. For example, 300 miles ÷ 10 gallons = 30 MPG. A fuel-gauge fraction is not a gallon measurement.

Why is my MPG lower than the window sticker?

The window sticker's combined rating is a U.S. EPA laboratory test-cycle estimate. Real driving adds cold starts, short trips before the engine warms up, stop-and-go traffic, air conditioning, higher speeds, hills, cargo, and idling. Winter fuel blends and low tire pressure can lower it further. A single tank measured on mostly city errands can sit well below the sticker without anything being wrong with the car.

Can I enter liters or imperial gallons?

No. The gallons field is U.S. gallons, and the calculator does not convert. To use a fill-up recorded in liters, divide by 3.785411784: 40 L is 10.57 U.S. gallons. An imperial gallon is 4.54609 L, about 20% larger than a U.S. gallon, so 10 imperial gallons is 12.01 U.S. gallons. Entering imperial gallons in the U.S.-gallon field overstates MPG by about 20%.

Why does my MPG change from tank to tank?

Each fill-up is one sample of a variable trip mix. Weather, traffic, speed, load, tire pressure, and the share of highway miles all shift between tanks, and a short tank exaggerates the effect. For a stable figure, add the miles and gallons from three or more consecutive tanks and divide the totals once. Dividing total miles by total gallons weights each tank by the fuel it used, which is more representative than averaging the individual MPG numbers.