Fuel Cost Calculator

Free fuel cost calculator. Estimate the cost of gas for a road trip from distance, fuel efficiency (MPG or L/100km), and fuel price. Works with miles or kilometers, gallons or liters.

AI-ready Use this tool with AI

This tool has a free JSON API. Copy a prompt or skill below to use it with ChatGPT, Claude, or any AI agent — no API key needed.

API docs
Enter your trip details above.

How fuel cost calculator works

This calculator estimates how much you will spend on fuel for a trip from three inputs: the trip distance, your vehicle fuel efficiency, and the fuel price per gallon or liter.

It normalizes units behind the scenes. Distance is converted between miles and kilometers (1 mile = 1.609344 km) and fuel volume between gallons and liters (1 gallon = 3.78541 liters). For MPG, fuel used is distance ÷ MPG; for L/100km, fuel used is distance × efficiency ÷ 100. The cost is fuel used × fuel price in the matching unit.

The result shows the total cost plus the fuel used in both gallons and liters and the distance in both miles and kilometers, so you can sanity-check the numbers regardless of which units you entered.

Frequently asked questions

How do I calculate fuel cost for a trip?
Multiply the trip distance by your fuel price per unit, then divide by your fuel efficiency. For MPG: cost = (distance ÷ MPG) × price per gallon. This calculator does that for you and handles unit conversions.
Can I use L/100km instead of MPG?
Yes. Set efficiency to L/100km and enter the distance in kilometers. Fuel used = distance × L/100km ÷ 100, then multiply by the price per liter.
Does it handle kilometers and liters?
Yes. Choose kilometers for distance, L/100km for efficiency, and per-liter for price — or mix any combination and the converter handles the unit math.
Why is my real-world cost higher?
Real fuel use varies with speed, traffic, load, air conditioning, and terrain. This calculator gives a planning estimate from steady-state efficiency; add a 10–15% buffer for city driving or heavy loads.