Toolzent

Fuel Cost Calculator

Free fuel cost calculator works out trip gas cost from distance, MPG or L/100km and fuel price. Get total cost and cost per mile, with worked examples.

Updated 2026-06-09 · Free · No sign-up · Runs privately in your browser

What is a fuel cost calculator?

A fuel cost calculator works out how much fuel a trip will burn and what it will cost, from three inputs: the distance you drive, your vehicle’s fuel economy, and the price of fuel. It returns the fuel used, the total cost, and the cost per mile or per kilometre so you can compare routes, vehicles or fill-up prices. Commuters, road-trippers, delivery drivers, rideshare workers and anyone splitting gas money use it to budget a journey before turning the key.

The tool above supports both US units (miles, miles per gallon, price per gallon) and metric units (kilometres, litres per 100 km, price per litre). Type your numbers in and it solves instantly, with no sign-up and nothing leaving your browser.

How is fuel cost calculated?

The calculator uses two simple steps: find the fuel burned, then multiply by its price. The exact method depends on which units you choose.

US units: fuel used (gallons) = distance ÷ MPG, then cost = gallons × price per gallon.

Metric units: fuel used (litres) = distance ÷ 100 × (L/100km), then cost = litres × price per litre.

In both cases it also divides the total cost by the distance to give a cost per mile or per kilometre. Here is what every term means and the unit it carries:

  • distance — how far you travel, in miles (US) or kilometres (metric).
  • MPG — miles per gallon, your fuel economy in US units. A higher number means less fuel burned per mile.
  • L/100km — litres consumed per 100 kilometres, the metric measure of economy. Here a lower number is more efficient.
  • price — the cost of fuel, per gallon (US) or per litre (metric).
  • cost per mile/km — total cost ÷ distance, the running cost of each unit of distance.

Note the two economy measures move in opposite directions: with MPG, bigger is better, while with L/100km, smaller is better. Keep the price unit matched to the economy unit — price per gallon with MPG, price per litre with L/100km.

Examples

Each example uses only the method above, so you can reproduce every answer by typing the same values into the calculator.

Example 1 — a US road trip

Distance 300 miles, fuel economy 30 MPG, price $3.50 per gallon.

gallons = distance ÷ MPG = 300 ÷ 30 = 10 gallons cost = gallons × price = 10 × $3.50 = $35.00 cost per mile = $35.00 ÷ 300 = about $0.117

The trip burns 10 gallons and costs $35.00, or about $0.117 per mile.

Example 2 — a metric trip

Distance 500 km, fuel economy 7 L/100km, price $1.60 per litre.

litres = distance ÷ 100 × L/100km = 500 ÷ 100 × 7 = 35 litres cost = litres × price = 35 × $1.60 = $56.00 cost per km = $56.00 ÷ 500 = $0.112

The drive uses 35 litres and costs $56.00, or about $0.112 per kilometre.

Example 3 — comparing two cars on the same US route

Same 300-mile trip and $3.50 per gallon, but a thirstier vehicle at 20 MPG.

gallons = 300 ÷ 20 = 15 gallons cost = 15 × $3.50 = $52.50 cost per mile = $52.50 ÷ 300 = $0.175

At 20 MPG the same trip needs 15 gallons and costs $52.50 — fifteen dollars more than the 30 MPG car, purely because of fuel economy.

Example 4 — a short metric commute

Distance 40 km, fuel economy 8 L/100km, price $1.80 per litre.

litres = 40 ÷ 100 × 8 = 3.2 litres cost = 3.2 × $1.80 = $5.76 cost per km = $5.76 ÷ 40 = $0.144

The commute burns 3.2 litres and costs $5.76, about $0.144 per kilometre.

Fuel cost by economy: a US reference

This chart holds the distance at 300 miles and the price at $3.50 per gallon, then steps the MPG, computing cost from 300 ÷ MPG × $3.50. It shows how strongly fuel economy drives the bill on a fixed route.

Distance (mi)Fuel economy (MPG)Price ($/gal)GallonsTotal cost
300203.5015.00$52.50
300253.5012.00$42.00
300303.5010.00$35.00
300403.507.50$26.25
300503.506.00$21.00

Going from 20 to 50 MPG more than halves the cost of the same 300-mile trip, from $52.50 down to $21.00.

Common uses

The fuel cost calculator helps wherever a journey has a price tag:

  • Budgeting a road trip — estimate the fuel bill before you set off and build it into the total cost.
  • Splitting gas money — work out a fair share for passengers using the trip cost and distance.
  • Comparing vehicles — see how much a more efficient car would save on your regular routes.
  • Choosing between routes — weigh a longer but faster motorway route against a shorter, slower one.
  • Tracking commuting costs — multiply a daily cost per mile by your working days to budget the month.
  • Rideshare and delivery — estimate the fuel portion of each job to understand real earnings.

Tips and common mistakes

  • Match the price unit to the economy unit. Use price per gallon with MPG, and price per litre with L/100km. Mixing them gives a meaningless number.
  • Remember which way economy runs. With MPG a bigger number is better; with L/100km a smaller number is better. They are not interchangeable.
  • Use real-world economy, not the sticker figure. City driving, loads, hills and cold weather all cut economy, so a number from your own fill-ups is more accurate than the rated MPG.
  • Account for a round trip. Enter total distance there and back if you are returning, or you will halve the true cost.
  • Keep distance and economy in the same system. Do not pair kilometres with MPG; convert to one consistent unit system first.
  • Watch the price decimals. Fuel is often priced to a tenth of a cent; rounding the price slightly changes the total over a long trip.

Limitations and notes

This calculator gives the exact arithmetic of distance, fuel economy and price — fuel used, total cost and cost per unit of distance. It does not predict your real economy: actual MPG or L/100km varies with traffic, speed, terrain, tyre pressure, cargo and weather, so the result is only as accurate as the economy figure you enter. It assumes a constant price for the whole trip and a single fuel type, and it does not add tolls, parking, maintenance or wear. The total reflects only fuel. Keep your units consistent — US inputs (miles, MPG, price per gallon) or metric inputs (kilometres, L/100km, price per litre) — and do not mix the two. Everything runs privately in your browser: the values you type stay on your device, the math is computed at full precision and only rounded for display, and nothing is uploaded.

For more vehicle math, size an engine with the engine displacement calculator, estimate output with the horsepower calculator, or switch between miles and kilometres per hour with the speed converter — and browse more in the automotive category.

Frequently asked questions

How do you calculate the fuel cost of a trip?+

Divide distance by fuel economy to get fuel used, then multiply by the price per unit: 300 miles ÷ 30 MPG = 10 gallons, and 10 × $3.50 = $35.00.

How much does a 300-mile trip cost at 30 MPG and $3.50 a gallon?+

It uses 10 gallons (300 ÷ 30) and costs $35.00 (10 × $3.50), which is about $0.117 per mile.

What is the fuel cost formula?+

US units: fuel used = distance ÷ MPG, cost = gallons × price per gallon. Metric: litres = distance ÷ 100 × L/100km, cost = litres × price per litre.

How do I work out fuel cost per mile?+

Divide total fuel cost by distance: a $35.00 trip over 300 miles is $35.00 ÷ 300 = about $0.117 per mile.

How do I calculate petrol cost in litres and kilometres?+

Litres used = distance ÷ 100 × L/100km, then cost = litres × price per litre: 500 km at 7 L/100km is 35 litres, and 35 × $1.60 = $56.00.

Does better MPG always lower the cost?+

Yes for a fixed distance and price: higher MPG means fewer gallons used, so the total cost and the cost per mile both fall.

Is the calculator free and private?+

Yes. It runs entirely in your browser, needs no sign-up, and none of the values you enter are uploaded anywhere.