Utility calculator
Fuel Cost Calculator
Divide the distance by the fuel economy you enter, then multiply by your fuel price. The sample price is an example. US and UK gallons stay separate, and liters per 100 kilometers is the inverse.
Fuel cost
Estimate the trip fuel
Result
Fuel cost
$14.00
Fuel used (US gal)
4
Liters
15.141647
L/100 km
9.408583
mpg (US gallon)
25
The price is the amount you entered. The page starts at 3.50 as an example and does not look up fuel prices.
A fuel amount past 6 decimal places is rounded half away from zero. The cost is rounded separately, to the cent.
The cost is an exact number of cents for this price.
How it works
Fuel used is the distance divided by the fuel economy, after the units describe the same distance and volume. Miles per US gallon uses the US gallon of 3.785411784 L. Miles per UK gallon uses the UK gallon of 4.54609 L. A mile is 1.609344 km. These are the same definitions as the fuel economy converter.
Liters per 100 kilometers runs the other way: km/L = 100 ÷ (L/100 km). Entering zero miles per gallon, zero kilometers per liter, or zero liters per 100 kilometers is rejected, because that conversion divides by zero. The same trip in miles and mpg, or in kilometers and the matching L/100 km, uses the same volume of fuel.
The cost is that volume times the price you enter, per US gallon, per UK gallon, or per liter. The field starts at 3.50 so the page has a result. That 3.50 is an example. It is not a current fuel price, and this page does not look up prices. The cost then rounds half away from zero to the nearest cent. The result is only the distance, economy, and price you entered. It does not add idling, cargo, or a hill.
Formulas
Volume comes from the distance and the economy. The price is yours, and the cent total rounds half away from zero.
- US gallons = miles ÷ mpg (US gallon)
- km/L from mpg (US) = mpg × 1.609344 ÷ 3.785411784
- L/100 km = 100 ÷ (km/L). Zero is undefined in either direction
- Cost = fuel volume in the price’s unit × the price you enter, rounded half away from zero to the nearest cent
Worked examples
Example: 100 miles at 25 mpg (US gallon) and an example price of $3.50 per US gallon uses 4 US gallons and costs $14.00.
100 ÷ 25 = 4 US gallons. 4 × $3.50 = $14.00. The price is an example, not a market price.
Example: 1 mile at 3 mpg (US gallon) and an example price of $1.00 per US gallon uses 1/3 US gallon and costs $0.33.
1 ÷ 3 = 1/3 US gallon. One-third of a dollar rounds half away from zero to $0.33.
FAQ
Is 3.50 a current fuel price?
No. 3.50 is the example that fills the price field when the page opens. Replace it with the price you pay. The calculator does not fetch a market price.
Why do US mpg and UK mpg use different amounts of fuel?
The gallons differ. A US gallon is 3.785411784 L and a UK gallon is 4.54609 L, so the same mpg number is a different volume per mile.
How does liters per 100 kilometers relate to mpg?
It is the inverse of kilometers per liter: km/L = 100 ÷ (L/100 km). For US mpg, km/L = mpg × 1.609344 ÷ 3.785411784. Zero mpg and zero L/100 km are rejected.
How is the fuel cost rounded?
Half away from zero, to the nearest cent. An exact cost of 1/3 of a dollar is shown as $0.33. An exact cost of half a cent is shown as $0.01.