How a trip gets a fuel cost
In miles, divide the distance by the miles per US gallon. That quotient is the gallons used. The cost is the distance times the price per gallon, divided by the miles per gallon. In kilometres, litres used are the distance times the litres per 100 kilometres, divided by 100. The cost multiplies that fuel by the price per litre.
Distance is greater than 0 and at most 100,000. Economy and price are each greater than 0 and at most 1,000. A blank field, zero, or a negative number has no result. A price of 4 is 4 only when you type 4. Switching the unit does not convert a number you already typed. Switching the currency changes the code and the decimal places. It does not convert the price. The miles result is not a conversion of the kilometre result. A US gallon is not an imperial gallon.
How to use this fuel cost calculator
- Choose miles or kilometres, and choose a currency.
- Enter the distance, greater than 0 and at most 100,000, the economy, and the price. Both are greater than 0 and at most 1,000. In miles the economy is miles per US gallon and the price is per gallon. In kilometres the economy is litres per 100 kilometres and the price is per litre.
- Read the trip cost. The row below is the fuel used, in US gallons or in litres.
Formula
In miles the cost is the distance times the price, divided by the miles per gallon. In kilometres the cost is the distance times the litres per 100 kilometres times the price, divided by 100.
Fuel used in miles is the distance divided by the miles per gallon. Fuel used in kilometres is the distance times the litres per 100 kilometres, divided by 100. The page uses the distance, the economy, and the price you type.
Where the formula comes from
Fuel economy is the relation on the Wikipedia page that defines fuel economy in automobiles.
Worked examples
Example: 300 miles at 30 miles per gallon and a price of 4
300 ÷ 30 = 10 US gallons. 300 × 4 ÷ 30 = 40, shown as USD 40.00. The same 40 is JPY 40 and KWD 40.000. KWD uses three decimal places.
Example: 250 miles at 25 miles per gallon and a price of 3.50
250 ÷ 25 = 10 US gallons. 250 × 3.50 ÷ 25 = 35, shown as USD 35.00.
Example: 120 miles at 24 miles per gallon and a price of 3.60
120 ÷ 24 = 5 US gallons. 120 × 3.60 ÷ 24 = 18, shown as USD 18.00.
Example: 400 kilometres at 5 litres per 100 kilometres and a price of 1.50
400 × 5 ÷ 100 = 20 litres. 400 × 5 × 1.50 ÷ 100 = 30, shown as USD 30.00.
Things to keep in mind
200 miles at 13 miles per gallon uses 15.3846153846 US gallons. At a price of 4 the cost before currency rounding is 61.5384615385, shown as USD 61.54. 100 miles at 3 miles per gallon uses 33.3333333333 US gallons. At a price of 4 the cost before currency rounding is 133.333333333, shown as USD 133.33. 150 miles at 32 miles per gallon uses 4.6875 US gallons. At 3.89 the cost before currency rounding is 18.234375, shown as USD 18.23. 320 kilometres at 7.5 litres per 100 kilometres uses 24 litres, shown as USD 43.20 at a price of 1.80. 180 kilometres at 6.5 litres per 100 kilometres uses 11.7 litres, shown as USD 18.72 at a price of 1.60. 90 kilometres at 8 litres per 100 kilometres uses 7.2 litres, shown as USD 16.20 at a price of 2.25. A near integer is shown as that integer. Other fuel amounts keep 12 significant digits, and a trailing zero is left off the screen. Money uses the decimal places of the currency you pick. This page does not add tolls or convert miles per gallon into litres per 100 kilometres.
Fuel cost calculator FAQ
Which fields are required?
Distance, economy, and price. Distance is greater than 0 and at most 100,000. Economy and price are each greater than 0 and at most 1,000. The starting unit is miles, and the starting currency is USD.
What is the row under the headline?
The fuel that trip uses. In miles it is US gallons. In kilometres it is litres. The headline is the trip cost.
Does the page use an imperial gallon?
No. Miles use a US gallon and a price per US gallon. Kilometres use litres per 100 kilometres and a price per litre. The page does not convert one into the other.
Does switching the unit or the currency convert the numbers?
No. A typed 300 stays 300, and a typed price stays that price. The currency changes the code and the decimal places. Miles per gallon is not a conversion of litres per 100 kilometres.
Why is there no result?
A blank field, zero, or a negative number has no result. The same is true for a distance above 100,000 or an economy or price above 1,000.
Does this fuel cost calculator store my figures?
A completed result can be saved in this browser’s local history, including the distance, the economy, the price, the unit, and the currency you chose. It stays on your device and is not sent to our servers or to analytics. Clear it with the history Clear action or by clearing site data.