Energy calculator

Gas Mileage Calculator

This gas mileage calculator works out your fuel economy the moment you enter how far you drove and how much fuel you used. You'll get MPG, L/100km, km/L, and UK MPG all at once, so it doesn't matter which units you think in. Add your fuel price and it'll show the cost per mile and what a trip really costs to drive. It's the honest way to see your car's mileage, measured from your own driving rather than a sticker.

  • MPG and metric
  • US or UK gallons
  • Cost per mile
  • Any distance unit
  • Live gauge

Last updated July 24, 2026 Method: MPG = miles / gallons Published by Muhammad Younus, Calcowa

Quick examples
Efficiency MPG on a 0 to 60 gauge
Fuel economy
25.0 MPG (US)
L/100km
9.41
MPG (UK)
30.0
km/L
10.63
Cost per mile
$0.14
Per 100 miles
$14.00
This trip fuel
$42.00
Formula used

MPG = 300 miles / 12 US gal = 25.0 MPG

The formula

How do you calculate gas mileage?

Gas mileage is distance divided by fuel. In US units, MPG = miles ÷ gallons. If you've covered 300 miles on 12 gallons, that's 300 ÷ 12, or 25 MPG. The metric world flips it around: L/100km is liters per hundred kilometers, where a lower number means a thriftier car, so they're measuring the same thing two ways.

The easiest way to measure it yourself is the fill-to-fill method. Top off the tank, reset the trip meter, drive normally, then refill and note the gallons it took. Those gallons are exactly what you've burned over those miles, so dividing gives your real-world mileage. That beats the window sticker, which comes from a lab test that doesn't match everyday driving, and it's the number that actually reflects how you drive.

MPG = miles ÷ gallons
Distance per tank of fuel
Step by step

Measuring your mileage in five steps

Here's the fill-to-fill method, the most accurate way to do it, and it's easy to fit into a normal week:

  1. 1

    Fill the tankTop it off completely and note the odometer, or reset your trip meter to zero.

  2. 2

    Drive as usualGo about your normal driving so the result reflects how you really drive.

  3. 3

    Refill and recordFill up again and write down the gallons or liters the pump added.

  4. 4

    Note the distanceRead the miles or kilometers from the trip meter since the last fill.

  5. 5

    DivideDistance divided by fuel gives your mileage. That's what this calculator does.

Fuel cost

What your mileage costs to drive

Once you know your MPG, the cost follows quickly, and it's eye-opening. Cost per mile is the fuel price divided by your MPG, so at $3.50 a gallon and 25 MPG you're spending about 14 cents a mile. Over a 12,000-mile year that's roughly $1,680 in fuel, and a thirstier 18 MPG truck at the same price would run closer to $2,330. Enter your fuel price above and the calculator fills in cost per mile, per 100 miles, and what your current trip burned. To compare the running cost of an electric option, the Electricity Cost Calculator turns watts into a dollar figure, and the Speed Converter handles mph and km/h if your trip data is mixed.

Flip the formula

How far can you drive on a gallon, or a tank?

Once you know your MPG, you can run it backward to see how many miles are left in the tank. Just multiply: miles = gallons × MPG. A car that gets 25 MPG covers 25 miles on 1 gallon, 125 miles on 5 gallons, and 250 miles on 10 gallons. Drop your own MPG and a gallon figure into the calculator above, or read it straight off the table below. It's the quick way to answer "2 gallons of gas is how many miles?" without doing the math in your head at the pump.

Gas in the tankAt 20 MPGAt 30 MPGAt 40 MPG
1 gallon 20 miles 30 miles 40 miles
2 gallons 40 miles 60 miles 80 miles
5 gallons 100 miles 150 miles 200 miles
10 gallons 200 miles 300 miles 400 miles
15 gallons 300 miles 450 miles 600 miles

Planning a trip the other way round? To find the fuel a drive needs, flip it again: gallons = miles ÷ MPG. A 700-mile drive at 25 MPG needs 700 ÷ 25, or 28 gallons. Multiply that by your gas price for the trip's fuel bill, or let the Fuel Cost Calculator handle the price math for a full route.

Reference

Typical gas mileage by vehicle

Rough real-world ranges so you can see where your number lands. City driving usually sits at the low end of each range and highway at the high end.

VehicleMPG (US)L/100km
Large SUV or truck 15 to 20 MPG 15.7 to 11.8 L/100km
Midsize sedan 25 to 30 MPG 9.4 to 7.8 L/100km
Compact car 32 to 40 MPG 7.4 to 5.9 L/100km
Hybrid 45 to 55 MPG 5.2 to 4.3 L/100km
Plug-in hybrid (gas mode) 40 to 50 MPG 5.9 to 4.7 L/100km
FAQ

Frequently asked questions

Why is my real mileage lower than the sticker?

Window-sticker numbers come from controlled tests, but real driving rarely matches them. Cold weather, short trips, fast acceleration, roof racks, low tire pressure, and city traffic all drag your mileage down. Measuring it yourself over a few tanks, the way this calculator does, gives you the honest figure for how you actually drive.

Divide the distance you drove by the fuel you used. In US units that's miles divided by gallons, which gives miles per gallon (MPG). If you drove 300 miles on 12 gallons, your mileage is 300 / 12, which is 25 MPG. For metric, liters per 100 km is fuel divided by distance, scaled to 100 km.

MPG = miles driven / gallons used. So fill up, reset your trip meter, drive until you refill, and divide the trip miles by the gallons it took to top off. That refill amount is the fuel you actually burned. This calculator does the division and converts to L/100km, km/L, and UK MPG at the same time.

They use different gallons. A US gallon is about 3.785 liters, while a UK (imperial) gallon is about 4.546 liters, so a UK gallon is roughly 20% bigger. That means the same car shows a higher MPG number in UK units, even though nothing about the fuel use changed. Always check which gallon a figure refers to.

Divide 235.215 by the MPG to get L/100km, since the two are inversely related. So 25 MPG becomes 235.215 / 25, which is about 9.4 L/100km. A higher MPG means a lower L/100km, because one measures distance per fuel and the other measures fuel per distance. The calculator shows both, so you won't have to convert by hand.

Divide the price per gallon by your MPG. At $3.50 a gallon and 25 MPG, that's 3.50 / 25, or about 14 cents a mile. Multiply by your trip distance for the total fuel cost. Enter a fuel price above and the calculator shows cost per mile, per 100 miles, and the gallons a trip would need.

It depends on the vehicle. For a regular gas car, 30 MPG and up is efficient, 25 MPG is average, and under 20 MPG is thirsty, typical of big trucks and SUVs. Hybrids often hit 45 to 55 MPG. City driving usually scores lower than highway, since stop-and-go traffic burns more fuel per mile.

Multiply the gallons by your MPG. Miles = gallons × MPG, so 10 gallons in a 25 MPG car covers 10 × 25, or 250 miles. The same 10 gallons stretches to 300 miles at 30 MPG and 400 miles at 40 MPG, while a thirsty 15 MPG truck only manages 150. Check your own MPG first, then multiply by the gallons in the tank.

Flip the formula: gallons = miles ÷ MPG. A 700-mile drive at 25 MPG needs 700 ÷ 25, which is 28 gallons, while at 35 MPG the same trip takes just 20. Multiply those gallons by your gas price for the fuel budget, or read the calculator's trip cost figure once you enter a price.

Keep going

Related calculators

Tracking running costs? These pair well with the gas mileage calculator.

Watching fuel costs?

Try the calculator above, or browse every energy tool in the hub.

Energy tools