Finance

How to Calculate Fuel Cost for a Trip (MPG, L/100km or km/L)

7 min read

Fuel cost for a trip equals the fuel you’ll burn multiplied by the price per gallon or liter. Work out the fuel first: divide distance by MPG (or km/L), or divide distance by 100 and multiply by L/100km. Multiply that by the price, and you have the trip’s total cost.

The formula

The math changes slightly depending on which fuel economy unit your car uses, because MPG and km/L measure distance per unit of fuel, while L/100km measures fuel per fixed distance, the direction is flipped.

MPG (miles per US gallon), distance in miles:

Fuel used (gal) = Distance (mi) ÷ MPG
Total cost = Fuel used × Price per gallon

km/L (kilometers per liter), distance in km:

Fuel used (L) = Distance (km) ÷ km/L
Total cost = Fuel used × Price per liter

L/100km (liters per 100 km), distance in km:

Fuel used (L) = (Distance (km) ÷ 100) × L/100km
Total cost = Fuel used × Price per liter

In all three cases, once you have the total cost you can divide it by distance again to get a cost per mile or per kilometer, useful for comparing routes or splitting gas money fairly.

Worked example: a 320-mile round trip

Say you’re driving to see family 160 miles away and back, 320 miles total, in a car that gets 30 MPG on the highway, with gas at $3.50 a gallon.

LegDistanceFuel usedCost
Outbound160 mi5.33 gal$18.67
Return160 mi5.33 gal$18.67
Total320 mi10.67 gal$37.33

The per-leg math: 160 ÷ 30 = 5.33 gallons, and 5.33 × $3.50 = $18.67. Double both numbers for the round trip and you land on 10.67 gallons and $37.33 total. Divide the total cost by the total distance (37.33 ÷ 320) and you get a cost of $0.117 per mile, a handy figure if you’re splitting the drive with someone else or comparing it against a different route.

This is also the example that trips people up most: it’s easy to price out the drive there and forget to double it for the way back. If you only entered 160 miles, you’d budget $18.67 and get caught short by another $18.67 you didn’t plan for.

Comparing two cars on the same trip

MPG and L/100km aren’t just different labels, they’re genuinely different measurements, and that matters when you’re cross-shopping cars from different markets. Say you’re deciding between two vehicles for that same 320-mile trip: Car A is rated at 30 MPG (the one from the example above), and Car B is an imported sedan spec’d at 7.5 L/100km, a common European rating.

To compare them in dollars, convert the metric spec to an MPG-equivalent first. The formula is:

MPG equivalent = 235.2 ÷ (L/100km)

For Car B: 235.2 ÷ 7.5 = 31.36 MPG. That’s a real efficiency edge over Car A’s 30 MPG, about 4.5% better.

CarEfficiencyFuel used (320 mi)Total costCost per mile
Car A30 MPG10.67 gal$37.33$0.117
Car B7.5 L/100km (≈31.36 MPG)10.20 gal$35.71$0.112

Car B saves $1.62 over the trip, about 4.3% cheaper, which lines up closely with its efficiency advantage. You can also skip the MPG conversion entirely and run the numbers directly in metric: 320 miles is about 515 km, so (515 ÷ 100) × 7.5 = 38.62 liters, and at $3.50 a gallon (about $0.925 a liter after converting from gallons), that’s 38.62 × $0.925 = $35.71. Same answer either way, the metric route just skips the MPG conversion step.

Try it with your own numbers

Enter your own distance, fuel economy and price below, in whichever of the three units matches your car, and the calculator handles the conversion and arithmetic for you.

Fuel economy unit

Calculated in your browser, never sent to a server.

Fuel Cost Calculator
Free, no sign-up, works on any device.
Open the full tool

Common mistakes and edge cases

Forgetting the round trip. As in the example above, a “160-mile trip” that’s really there-and-back is 320 miles of fuel, not 160. Always enter the full distance you’ll actually drive, not just the distance to your destination.

Confusing which direction is “better” for each unit. Higher MPG and higher km/L both mean better fuel economy, since both measure distance per unit of fuel. L/100km works the opposite way: lower is better, since it measures fuel burned over a fixed distance. Mixing these up when comparing two cars will make the more efficient one look worse.

Using a stale fuel price. Gas prices swing week to week and vary meaningfully by region and by grade (regular vs. premium). A calculation done with last month’s price, or with the national average instead of your local price, can be off by 10% or more on a long trip. Check the current price at the pump or a fuel price site before budgeting.

Ignoring the gap between city and highway mileage. The MPG on a window sticker is usually a combined figure, but real trips lean one way or the other. A car rated 30 MPG combined might get closer to 34 MPG on a steady highway drive and 26 MPG in stop-and-go city traffic. For a road trip that’s mostly highway, using the highway-specific MPG figure (if your car’s manual lists one) gives a more accurate estimate than the combined number.

Skipping the currency and unit conversion. If you’re pricing a metric-spec car in US dollars, or an American car’s MPG rating against a price quoted per liter, convert one side to match the other before you compare. Mixing gallons and liters, or miles and kilometers, without converting first will give you a number that looks precise but means nothing.

Frequently asked questions

Does this fuel cost calculation account for tolls, parking or other trip costs? No, it only covers fuel. Distance times economy times price gives you the fuel burned and its cost, nothing else. If you want a full trip budget, add tolls, parking and any other costs on top of the fuel total separately.

Why does my actual fuel cost sometimes come in higher than the calculator’s estimate? The estimate assumes your car’s rated MPG or L/100km holds for the whole trip. Real-world factors push the true number higher: a heavy load or trailer, aggressive driving, running the AC hard, worn tires, or a lot of stop-and-go traffic all burn more fuel than the rated figure assumes. Treat the calculated number as a baseline, not a guarantee.

Which unit should I use if I don’t know my car’s exact rating? Use whichever one is on your car’s window sticker or spec sheet, since that’s the number you can trust. US cars list MPG, most of Europe and much of the rest of the world lists L/100km, and Brazil, among others, lists km/L. If you only have a rough estimate, MPG and km/L are usually easier to reason about since a higher number is simply better, with no direction to flip.

How do I estimate fuel cost for a trip split across highway and city driving? Run the calculation separately for each segment, using the city MPG for the city portion and the highway MPG for the highway portion, then add both costs together. This is more accurate than applying a single combined MPG figure to a trip that’s a mix of both, especially on longer drives where the split isn’t 50/50.

Fuel Cost Calculator
Now try it yourself with the full tool.
Try it now