Ad Space

Trip Details

Miles Per Gallon (MPG)

Cost per Mile
Total Fuel Cost
Ad Space

How Gas Mileage (MPG) Is Calculated

Gas mileage, expressed as miles per gallon (MPG), tells you how far a vehicle travels on a single gallon of fuel. It's found by dividing the distance covered by the amount of fuel it took to cover that distance. Once you know MPG, it's easy to convert fuel efficiency into a dollar figure — cost per mile and total fuel cost — by bringing in the price of gas, which matters most when you're comparing two vehicles or two trips head to head rather than looking at MPG alone.

MPG=Distance TraveledFuel Used\text{MPG} = \frac{\text{Distance Traveled}}{\text{Fuel Used}}

Distance Traveled: total miles driven on the tank or trip being measured.

Fuel Used: gallons of fuel consumed over that same distance.

Worked Example

A driver covers 300 miles on 12 gallons of gas: MPG = 300 ÷ 12 = 25 MPG. If gas costs 3.50 dollars per gallon, cost per mile = 3.50 ÷ 25 = 0.14 dollars per mile, and the total fuel cost for the trip = 12 × 3.50 = 42 dollars. Cost per mile is what makes two different vehicles or two different trips directly comparable, since a higher MPG at a higher local gas price can still end up costing about the same per mile as a lower MPG at a cheaper price.

Metric Version (L/100km)

Most of the world measures fuel economy as liters consumed per 100 kilometers driven (L/100km) rather than distance per unit of fuel — and the two run in opposite directions. A higher MPG means better efficiency, but a lower L/100km means better efficiency, since L/100km measures fuel burned rather than distance covered. Switch the US/Metric dropdown above to enter distance in kilometers and fuel used in liters; the calculator converts your currently entered trip figures automatically rather than resetting them.

L/100km=Fuel Used (L)Distance (km)×100\text{L/100km} = \frac{\text{Fuel Used (L)}}{\text{Distance (km)}} \times 100

MPG and L/100km aren't related by a simple multiplier — they're reciprocals of each other, tied together through the mile-to-kilometer and gallon-to-liter conversion factors:

L/100km235.21MPG\text{L/100km} \approx \frac{235.21}{\text{MPG}}

A car getting 25 MPG in the US works out to roughly 235.21 divided by 25, or about 9.4 L/100km. Cost per kilometer follows the same reciprocal logic as cost per mile, just built from price per liter and L/100km instead of price per gallon and MPG.

Common Mistakes

Forgetting to reset the trip odometer right after a fill-up is the most common error — without a clean starting point, the distance figure is wrong and so is everything calculated from it. A close second is using a partial fill-up instead of filling the tank completely: if the tank isn't topped off both times, the gallons figure doesn't represent what was actually burned over the measured distance, which understates or overstates MPG depending on which direction the partial fill leans.

Terms You Should Know

MPG — miles per gallon, the standard US measure of fuel economy: how far a vehicle travels per gallon of fuel consumed.

Fill-to-Full Method — the standard way to measure real-world gallons used: reset the trip odometer at a full tank, drive normally, then record the gallons needed to fill the tank completely again at the next stop.

Cost per Mile — price per gallon divided by MPG; converts fuel efficiency into a dollar figure that's directly comparable across vehicles and trips.

Frequently Asked Questions

How do I calculate my car's gas mileage (MPG)?

Divide the distance traveled in miles by the number of gallons of fuel used for that distance. For example, 300 miles on 12 gallons is 300 divided by 12, which equals 25 MPG.

How do I get an accurate gallons-used figure?

Use the fill-to-full method: reset your trip odometer right after a full tank, drive normally, then fill the tank completely again at your next stop. The gallons needed to refill it to full is the true amount used over that distance. A partial fill-up will under- or overstate the gallons used and throw off the MPG result.

What is cost per mile and why does it matter?

Cost per mile is the price per gallon divided by your MPG. It converts fuel efficiency into a dollar figure you can use to compare vehicles or trips directly, since two vehicles with the same MPG can still cost different amounts per mile if gas prices differ between them.

Can I use this calculator in kilometers and L/100km instead of miles and MPG?

Yes — switch the US/Metric dropdown above the input fields. Distance switches to kilometers and fuel used switches to liters, and the main result shows liters per 100 kilometers instead of miles per gallon, along with cost per kilometer instead of cost per mile. Note that L/100km runs the opposite direction from MPG: a lower L/100km number means better fuel efficiency, while a higher MPG number does.

Ad Space