Skip to content
CalcSpectrum

Fuel Cost Calculator

Estimate trip fuel consumption and cost from distance, fuel efficiency (mpg, km/L, or L/100km), and fuel price.

Free to use · Instant results

Calculator Inputs

Sets the currency this calculator's numbers are denominated in. This is presentation only — it does NOT convert your numbers between currencies, it only changes how they're formatted.

Distance must be zero or a positive number.

Must be a positive number, in the unit matching the selected mode.

Price per US gallon for MPG mode; price per liter for km/L and L/100km.

Estimated Fuel Cost
$14.00
Fuel Required (Liters)
15.14
Fuel Required (US Gallons)
4.00
Your spreadsheet is generated in your browser.

About these results

CalcSpectrum calculators produce automated estimates using established formulas and the specific values you enter. Because real-world outcomes depend on input accuracy, mathematical assumptions, and rounding conventions, please verify critical figures with an appropriately qualified financial, tax, medical, legal, or other professional, as relevant.

How It's Calculated

Formula

litersUsed={milesmpg×3.785411784mpg modekmkm/Lkm/L modekm×L/100km100L/100km mode\text{litersUsed} = \begin{cases} \dfrac{\text{miles}}{\text{mpg}} \times 3.785411784 & \text{mpg mode} \\ \dfrac{\text{km}}{\text{km/L}} & \text{km/L mode} \\ \text{km} \times \dfrac{\text{L/100km}}{100} & \text{L/100km mode} \end{cases}

Fuel Cost estimates how much fuel a trip needs and what it will cost, from a distance, a fuel efficiency figure, and a fuel price. Distance and efficiency can be entered in US terms (miles, mpg) or metric terms (kilometers, km/L, or L/100km). Internally, distance is normalized to both miles and kilometers using the exact factor 1 mile = 1.609344 km, and fuel used is normalized to liters: for mpg mode, gallons used = miles / mpg, then liters = gallons x 3.785411784 (the exact liters-per-US-gallon factor); for km/L mode, liters used = km / (km/L); for L/100km mode, liters used = km x (L/100km) / 100. Cost is fuel used (gallons for mpg mode, liters for the metric modes) multiplied by the entered fuel price, computed with decimal.js to avoid floating-point rounding error in the currency result. This is an estimate only — actual fuel consumption varies with driving style, vehicle condition, terrain, and weather.

Worked Examples

100 miles at 25 mpg, $3.50/gallon

  1. Gallons used: 100 / 25 = 4 gallons.
  2. Liters used: 4 x 3.785411784 = 15.141647 L.
  3. Cost: 4 x $3.50 = $14.00.

100 km at 8 L/100km, $1.50/liter

  1. Liters used: 100 x 8 / 100 = 8 L.
  2. Cost: 8 x $1.50 = $12.00.

Frequently Asked Questions

Is this an exact prediction of how much fuel I'll use?

No. This is an estimate based on the fuel efficiency figure you enter. Actual fuel use varies with driving style, traffic, terrain, weather, and vehicle condition.

What fuel price unit should I enter?

For MPG mode, enter the price per US gallon. For km/L and L/100km modes, enter the price per liter — the calculator matches the cost calculation to the volume unit implied by your selected efficiency mode.

Why does the calculator normalize everything to liters?

Normalizing to one common volume unit (liters) lets the same underlying calculation handle mpg, km/L, and L/100km consistently, and lets it report fuel required in both liters and US gallons regardless of which mode you used.

Does this account for fuel taxes or price changes over the trip?

No. This calculator uses a single fuel price you provide and does not fetch live fuel prices or apply regional tax logic.