Fuel Cost Calculator
Fuel cost calculator that estimates trip cost from distance, fuel efficiency, and gas price. Choose units and see fuel needed plus total spend.
Fuel Cost Calculator
Result will appear here...
What the fuel cost calculator does
So you are planning a trip and you want to know what the fuel will cost before you pull up to the pump. That is the whole job of this tool. You give it three things, the distance you are driving, how much fuel your vehicle uses, and the price of fuel where you are, and it tells you how much fuel the trip will burn and what that fuel will cost you.
It works the same for a short drive across town or a long road trip, and it does not care whether you think in kilometers and liters or miles and gallons. You pick the units you are comfortable with and it handles the rest.
How to use it
There are three boxes to fill in. Here is what goes in each one.
- Trip Distance. Type how far you are driving, then pick kilometers or miles next to it. For a round trip, remember to enter the distance both ways, not just one way.
- Fuel Efficiency. Type how much fuel your vehicle uses and choose the matching unit. You can use liters per 100 km, miles per gallon, kilometers per liter, or liters per mile. If you are not sure what your number is, there is a quick way to find it down in the questions below.
- Gas/Fuel Price. Type the current price of fuel and choose whether that price is per liter or per gallon.
Press Calculate and you will see how much fuel the trip needs and the total cost. Press Reset to clear the boxes and start over.
How the fuel cost is worked out
The idea is simple. First you find how much fuel the trip needs, then you multiply that fuel by its price. In one line:
Fuel cost = fuel needed for the trip × price of fuel
The fuel needed depends on how far you go and how much your vehicle drinks. Here is the part that trips people up, though. Fuel efficiency is written in two opposite styles.
Some units measure distance per fuel, like miles per gallon or kilometers per liter. A bigger number means a more efficient vehicle, and you find the fuel by dividing the distance by that figure. Other units measure fuel per distance, like liters per 100 km. A smaller number is better there, and you find the fuel by multiplying. The calculator takes whichever unit you picked and converts it to one common form, liters per 100 km, before it does any math. That way the two styles always agree, and you can mix and match units without anything breaking.
This is the same basic method the US Department of Energy uses on its fuel economy site. One more thing worth knowing, when you choose a price per gallon the tool converts using the US gallon, which is 3.785411784 liters. There is more on units and the exact numbers further down.
An example with real numbers
Let us run two, one in metric and one in miles and gallons, so you can see it both ways.
A trip in kilometers and liters
Say you are driving 300 km. Your car uses 7 liters per 100 km, and fuel costs 1.20 per liter.
- Fuel needed = 300 × 7 ÷ 100 = 21 liters
- Cost = 21 × 1.20 = 25.20
So the trip needs 21 liters and the fuel works out to 25.20 at that price.
A trip in miles and gallons
Now say you are driving 450 miles, your car does 30 miles per gallon, and gas is 3.50 per gallon.
- Gallons needed = 450 ÷ 30 = 15 gallons
- Cost = 15 × 3.50 = 52.50
So the trip needs 15 gallons and costs 52.50. The calculator runs these same steps for you, it just lines up the units first so you are free to mix and match them.
What happens if your car is more or less efficient
After it shows your result, the calculator also prints a short list of what the same trip would cost at a few other efficiency values. This is handy for two reasons. If you are thinking about a different car, you can see how much a thirstier or a more economical engine would change the cost of a trip like this one. And if you are not certain of your exact mileage, the list gives you a quick range to sit your real number inside, instead of trusting a single guess.
What actually changes your fuel cost
The number you get here is a clean estimate. Your real spend on the day can land a little higher or lower, and it helps to know why.
- City driving versus the highway. Stop and go traffic burns more fuel than steady cruising, so a city trip usually costs more per mile than the highway figure on your car.
- The mpg on the sticker is a lab number. The official mileage for a vehicle is measured under set test conditions. Real roads, real weather, and real driving rarely match the lab exactly, so treat your car's rated figure as a starting point.
- Fuel price moves. Pump prices change week to week and from one area to the next, so your result is only as current as the price you type in.
- Load, weather, and how you drive. A heavy load, cold weather, running the air conditioning, and hard acceleration all push fuel use up.
Simple ways to spend less on fuel
If the number came out higher than you hoped, a few habits make a real difference over time. Research compiled by the US Department of Energy shows that how you drive can change your mileage by a surprising amount.
- Go easy on the pedal. Aggressive driving, all that hard acceleration and sharp braking, can cut your mileage by something like 15 to 30 percent on the highway, going by the Department of Energy's figures. Smooth and steady wins here.
- Ease off the speed. Most vehicles get their best mileage up to around 50 mph and then drop off the faster you go, so a calmer pace on a long drive saves real fuel.
- Keep your tires at the right pressure and your vehicle serviced. Underinflated tires and a poorly tuned engine quietly cost you mileage.
- Drop the dead weight and the roof box when you are not using them. Extra weight and drag both add up on a long trip.
- Plan the route. Fewer detours and less time stuck in traffic means less fuel burned.
Units it supports, and the exact conversions
You can enter distance in kilometers or miles, fuel efficiency in liters per 100 km, miles per gallon, kilometers per liter, or liters per mile, and price per liter or per gallon. Behind the scenes the tool leans on a few standard conversions, and these are exact by definition, not rounded guesses.
| Conversion | Exact value |
|---|---|
| 1 mile | 1.609344 kilometers |
| 1 US gallon | 3.785411784 liters |
| 1 US mpg | 235.215 ÷ mpg, in liters per 100 km |
A quick note on gallons. This calculator uses the US gallon. The UK (imperial) gallon is larger, about 4.546 liters, so if you are in the UK and your mpg is the imperial figure, the result will read a little low. The metric units, liters and kilometers, are not affected.
Questions people ask
How is the fuel cost calculated?
It works out the fuel your trip needs, then multiplies that by the price of fuel. In short, fuel cost = (distance ÷ fuel efficiency) × fuel price, with the units lined up first.
Does it use US gallons or UK gallons?
US gallons. One US gallon is about 3.785 liters. If your mpg is a UK (imperial) figure, the estimate will read a bit low, since an imperial gallon is larger at about 4.546 liters.
How do I find my vehicle's fuel efficiency?
Fill the tank, note your odometer, then drive normally until your next fill up. Divide the distance you covered by the fuel you put in. That gives you the miles per gallon or kilometers per liter for your real driving, which is better than the sticker number.
Why is my actual cost different from the result?
Usually because the pump price changed, or because your real mileage differs from the figure you entered. City traffic, weather, a heavy load, and hard driving all raise fuel use beyond the rated number.
Is liters per 100 km or miles per gallon better?
Neither is more correct, they just measure the same thing in opposite directions. Miles per gallon is distance per fuel, so higher is better. Liters per 100 km is fuel per distance, so lower is better. Use whichever one your car shows, the calculator converts it either way.
References
- National Institute of Standards and Technology (NIST), Special Publication 811: Guide for the Use of the International System of Units (SI). https://www.nist.gov/pml/special-publication-811
- U.S. Department of Energy and U.S. Environmental Protection Agency, FuelEconomy.gov: Driving More Efficiently. https://www.fueleconomy.gov/feg/driveHabits.jsp
- Thomas, J., Huff, S., West, B., and Chambon, P. (2017). Fuel Consumption Sensitivity of Conventional and Hybrid Electric Light-Duty Gasoline Vehicles to Driving Style. SAE International Journal of Fuels and Lubricants, 10(3). Oak Ridge National Laboratory. https://doi.org/10.4271/2017-01-9379
Skanda Aryal is a full stack engineer focused on accessible web experiences, with personal interests in time zones, travel, hiking, and geography. His enjoys playing with utilities tied to movement, schedules, places, and time based coordination. At Eon Tools, he reviews geography, transportation, times now, and date and time tools.