Gas Mileage Calculator

Use distance driven and the amount of fuel used over that distance to calculate miles per gallon. A consistent fill-up method improves accuracy across multiple trips.

Quick answer. Gas mileage is the miles driven divided by the gallons used. 360 miles on 15 gallons is 24 mpg, or 9.8 L/100km. At $3.00 a gallon, that fill-up cost $45.00 and each mile cost about 13 cents.

How to measure your own gas mileage

Record the odometer reading when you fill the tank. At the next fill-up, record the new reading and how many gallons it took to fill the tank again. The miles driven divided by the gallons added is your gas mileage, because those gallons are what the car used for those miles. Enter the current and previous odometer readings and the gallons, and add a gas price if you want the cost.

Worked example with the default numbers

The page opens with odometer readings of 12,360 and 12,000 miles, 15 gallons added, and gas at $3.00 a gallon. The distance is 12,360 − 12,000 = 360 miles, so the mileage is 360 ÷ 15 = 24 mpg. The tool also shows it as 9.8 L/100km (235.215 ÷ 24) and 10.2 km/L. The fill-up cost is 15 × $3.00 = $45.00 and each mile cost $0.13 ($3.00 ÷ 24 = 12.5 cents, shown rounded to the cent).

Reading the other units

Miles per gallon is the US measure. Outside the US, fuel use is often given as litres per 100 km, where a lower number is better, or as km per litre. The calculator uses the US gallon of 3.785412 litres. The imperial (UK) gallon is bigger, 4.54609 litres, so the same car reads about 20% higher in imperial mpg: 24 US mpg is about 28.8 imperial mpg.

US mpgL/100kmkm/LCost per mile at $3.00Gallons for 12,000 milesCost for 12,000 miles
1515.686.38$0.2800$2,400
2011.768.5$0.15600$1,800
249.810.2$0.125500$1,500
307.8412.75$0.1400$1,200
405.8817.01$0.075300$900
504.721.26$0.06240$720
Fuel for 12,000 miles a year at $3.00 a gallon, by mpgA 24 mpg car burns 500 gallons for 12,000 miles ($1,500); a 30 mpg car burns 400 ($1,200), saving 100 gallons and $300 a year.Fuel for 12,000 miles a year at $3.00 a gallon, by mpg15 mpg$2,40020 mpg$1,80024 mpg$1,50030 mpg$1,20040 mpg$90050 mpg$720
A higher mpg pays back every year.

What gas price does to the cost of a mile

Cost per mile is the gas price divided by the mpg. At 24 mpg, a gallon at $2.50 means 10.4 cents a mile and at $4.00 it means 16.7 cents.

Gas priceCost per mile at 24 mpg
$2.510.4 cents
$312.5 cents
$3.514.6 cents
$416.7 cents
Cost per mile at 24 mpg for different gas prices (cents)At 24 mpg each dollar of gas price adds about 4.2 cents to every mile driven; $3.00 a gallon is 12.5 cents a mile.Cost per mile at 24 mpg for different gas prices (cents)$2.5 a gallon10.4 cents$3 a gallon12.5 cents$3.5 a gallon14.6 cents$4 a gallon16.7 cents
The price of gas moves every mile.

Average several tanks, not one

One tank is a snapshot. Weather, traffic, a heavy load or a different pump can move a single result by several mpg. Suppose a second fill-up shows 340 miles on 13.6 gallons (25.0 mpg) and a third shows 320 miles on 14.5 gallons (22.07 mpg). The right average is the total miles over the total gallons: 1020 ÷ 43.1 = 23.67 mpg. Averaging the three mpg figures gives 23.69, which is close, but the first method is the correct one when the tanks differ in size.

Why mileage changes

  • Driving style. The Department of Energy says speeding, rapid acceleration and hard braking can lower gas mileage by roughly 15% to 30% at highway speeds and 10% to 40% in stop-and-go traffic.
  • Speed. Mileage usually falls quickly above about 50 mph.
  • Tyres. Keep them at the pressure on the sticker in the door jamb or in the owner’s manual, not the maximum printed on the sidewall.
  • Load and weather. Extra weight, roof racks, cold weather and winter fuel blends all cost mileage.
  • Trip length. Short trips with a cold engine use more fuel per mile.
A 24 mpg car driven aggressively at highway speeds (miles per gallon)The Department of Energy puts the loss from speeding, hard acceleration and heavy braking at roughly 15% to 30% on the highway.A 24 mpg car driven aggressively at highway speeds (miles per gallon)Smooth driving24.0 mpgAggressive, 15% lower20.4 mpgAggressive, 30% lower16.8 mpg
Aggressive driving can cost a quarter of your mileage.

Getting an accurate reading

  • Fill the tank to the first click of the pump each time, using the same pump if you can and parking the car in the same position.
  • Record the odometer at each fill, not just the gallons.
  • A partial fill-up throws the figure off, since the method assumes you filled the tank completely both times.
  • Measure over several tanks and across seasons.

Common mistakes

  • Entering the previous reading as the current reading, which stops the calculation because the current reading must be larger.
  • Using litres in the gallons box. The tool expects US gallons.
  • Comparing a single tank with the number on the window sticker.
  • Forgetting that L/100km goes the other way: a lower number means better economy.
  • Leaving the gas price empty and expecting a cost. The cost lines appear only when you enter a price.

How to read your result

The large number is the gas mileage in miles per gallon, followed by the same figure in L/100km and km/L, and the distance driven. If you entered a price, the cost of the fill-up and the cost per mile appear as well. Use the Fuel Cost Calculator to turn your mpg into the cost of a trip.

The odometer and the pump can both be off by a little, so treat a single result as an estimate and average several tanks.

What to do next

Common questions

Does this account for partial fill-ups?

No. The method assumes you filled the tank completely both times. A partial fill-up throws off the gallons-per-mile calculation.

What's a good MPG?

It varies enormously by vehicle type. Compact cars often reach 30 mpg or more, while large trucks and SUVs are often well below that. Compare your result with the rating for your own vehicle.

How do I convert mpg to L/100km?

Divide 235.215 by the mpg. 24 mpg is 9.8 litres per 100 kilometres. A lower L/100km figure means better fuel economy.

Why is my mileage different from the sticker?

Driving style, speed, terrain, weather, tyre pressure and load all change it. Aggressive driving alone can lower mileage by roughly 15% to 30% at highway speeds.

How many tanks should I average?

Several. A single tank can differ by a few mpg. Add up the miles and the gallons over all the tanks and divide.

How is the cost per mile calculated?

Divide the gas price by the mpg. At $3.00 a gallon and 24 mpg, it is 12.5 cents a mile.

Sources: FuelEconomy.gov: Driving more efficiently; FuelEconomy.gov: Keeping your car in shape; Wikipedia: Fuel economy in automobiles

More Everyday Calculators

Pick another tool to jump straight to it.