CodeKitHub
English
Everyday Tools

Fuel Cost Calculator

Enter the distance you're driving, your vehicle's fuel consumption and the price per liter or gallon, and this calculator works out how much fuel you'll use and what the trip will cost. It supports the three common ways consumption is expressed — liters per 100 km, kilometers per liter, and miles per gallon — so you can use whatever figure is on your car's spec sheet or dashboard. Everything runs in your browser; nothing is uploaded.

Fuel consumption
Fuel used
Total cost

Everything is calculated in your browser.

What Is This Tool?

A fuel cost calculator turns three numbers — distance, how much fuel your vehicle burns per unit of distance, and the price of fuel — into two answers: how many liters or gallons the trip will use, and how much that fuel will cost. It's the same arithmetic whether you're planning a weekend road trip, comparing two cars before buying, or working out a delivery route's running cost.

Fuel consumption is quoted in different units depending on the country and the source. Europe typically uses liters per 100 km (lower is better), the US and UK typically use miles per gallon (higher is better), and some regions prefer km per liter. This tool converts between all three so you don't have to do the math by hand.

Why Use It?

  • Supports all three consumption formats: liters/100km, km/liter and miles/gallon.
  • Switch freely between kilometers and miles, and between liters and gallons.
  • Instant results as you type — no page reload, no sign-up.
  • Useful for trip budgeting, comparing vehicles, or estimating delivery and commute costs.
  • Runs entirely in your browser — your numbers are never sent anywhere.

How to Use

  1. Enter the distance of your trip and choose kilometers or miles.
  2. Enter your vehicle's fuel consumption in whichever format you have it — L/100km, km/L, or mpg.
  3. Enter the current price of fuel per liter or per gallon.
  4. Read off the estimated fuel used and the total cost, updated instantly.

Example

Input

400 km trip, car rated at 6.5 L/100km, fuel at $1.70/liter

Output

≈26 liters used, about $44.20 total fuel cost

Fuel used = distance ÷ 100 × consumption = 400 ÷ 100 × 6.5 = 26 L. Cost = 26 × $1.70 = $44.20.

Quick consumption reference

L/100kmkm/Lmpg (US)
4 L/100km25.0 km/L58.8 mpg
6 L/100km16.7 km/L39.2 mpg
8 L/100km12.5 km/L29.4 mpg
10 L/100km10.0 km/L23.5 mpg
12 L/100km8.3 km/L19.6 mpg

Related tools

For converting the distance itself between miles and kilometers, or the fuel volume between liters and other units, the dedicated unit converters below are quicker than doing it by hand.

Mile to KM Converter · Liter to ML Converter · Unit Converter

Frequently Asked Questions

How do you calculate fuel consumption per 100 km?

Divide the liters used by the distance in kilometers, then multiply by 100: consumption (L/100km) = fuel used (L) ÷ distance (km) × 100. For example, if you used 40 liters over 600 km, that's 40 ÷ 600 × 100 = 6.67 L/100km. Lower numbers mean the car uses less fuel per distance.

How do I estimate the total fuel cost for a long trip?

Multiply the trip distance by the consumption rate to get liters needed, then multiply by the price per liter: cost = (distance ÷ 100 × L/100km) × price per liter. For a 1,200 km trip at 7 L/100km with fuel at $1.60/L, that's 1,200 ÷ 100 × 7 = 84 L, then 84 × $1.60 = $134.40. Add a margin for detours, traffic and price differences along the route.

How do I convert miles per gallon to liters per 100 km?

Divide 235.21 by the mpg figure. For example 30 mpg ≈ 235.21 ÷ 30 ≈ 7.84 L/100km. This calculator does the conversion for you when you switch units, so you don't need to remember the formula.

Does this account for traffic, hills or driving style?

No — it uses the average consumption figure you enter, which already reflects your typical driving conditions if you calculated it from a real fill-up. City driving, hills, cold weather and aggressive acceleration all increase real consumption above the manufacturer's rated figure, so treat the result as an estimate, not an exact prediction.

Is my data stored anywhere?

No. The calculation runs entirely in your browser with JavaScript; nothing you enter is sent to a server, stored or logged.

Related Tools