How a road trip gets a gas cost
One way, the distance driven is the distance you type. A round trip doubles it. In miles, divide that driven distance by the miles per US gallon. That quotient is the gallons used. The cost is the driven distance times the price per gallon, divided by the miles per gallon. In kilometres, litres used are the driven distance times the litres per 100 kilometres, divided by 100. The cost multiplies that fuel by the price per litre.
The one-way 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 trip, the unit, or the currency 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 road trip calculator
- Choose one way or a round trip, choose miles or kilometres, and choose a currency.
- Enter the one-way 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 gas cost. The rows below are the fuel used and the distance driven.
Formula
A round trip sets the driven distance to twice the one-way distance. In miles the cost is that driven distance times the price, divided by the miles per gallon. In kilometres the cost is the driven distance times the litres per 100 kilometres times the price, divided by 100.
One way sets the driven distance equal to the distance you type. Fuel in miles is the driven distance divided by the miles per US gallon. Fuel in kilometres is the driven distance times the litres per 100 kilometres, divided by 100. The page snaps the cost from the driven distance, the economy, and the price in one step.
Where the formula comes from
Fuel economy is the relation on the Wikipedia page that defines fuel economy in automobiles.
Worked examples
Example: one way, 300 miles at 30 miles per gallon
The distance driven is 300 miles. 300 ÷ 30 = 10 US gallons. 300 × 4 ÷ 30 = USD 40.00.
Example: round trip, 300 miles at 30 miles per gallon
The distance driven is 600 miles. 600 ÷ 30 = 20 US gallons. 600 × 4 ÷ 30 = USD 80.00. The same 80 is JPY 80, and KWD 80.000 with three decimal places.
Example: round trip, 250 miles at 25 miles per gallon
The distance driven is 500 miles. 500 ÷ 25 = 20 US gallons. 500 × 3.50 ÷ 25 = USD 70.00.
Example: round trip, 400 kilometres at 5 litres per 100 kilometres
The distance driven is 800 kilometres. 800 × 5 ÷ 100 = 40 litres. 800 × 5 × 1.50 ÷ 100 = USD 60.00.
Things to keep in mind
One way, 120 miles at 24 miles per gallon and a price of 3.60 is 5 US gallons and USD 18.00. The round trip of that drive is 240 miles, 10 US gallons, and USD 36.00. A round trip of 200 miles at 13 miles per gallon and a price of 4 drives 400 miles, uses 30.7692307692 US gallons, and the cost 123.076923077 is shown as USD 123.08. A round trip of 100 miles at 3 miles per gallon and a price of 4 drives 200 miles, uses 66.6666666667 US gallons, and the cost 266.666666667 is shown as USD 266.67. A round trip of 150 miles at 32 miles per gallon and a price of 3.89 drives 300 miles, uses 9.375 US gallons, and the cost 36.46875 is shown as USD 36.47. One way, 400 kilometres at 5 litres per 100 kilometres and a price of 1.50 is 20 litres and USD 30.00. A round trip of 320 kilometres at 7.5 litres per 100 kilometres and a price of 1.80 drives 640 kilometres, uses 48 litres, and costs USD 86.40. A round trip of 180 kilometres at 6.5 litres per 100 kilometres and a price of 1.60 drives 360 kilometres, uses 23.4 litres, and costs USD 37.44. A round trip of 90 kilometres at 8 litres per 100 kilometres and a price of 2.25 drives 180 kilometres, uses 14.4 litres, and costs USD 32.40. A near integer is shown as that integer. Other results keep 12 significant digits, and a trailing zero is left off the screen. This page does not add tolls, and it does not convert miles per gallon into litres per 100 kilometres.
Road trip gas cost FAQ
Which fields are required?
One-way 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 trip is one way, the starting unit is miles, and the starting currency is USD.
What are the rows under the headline?
One row is the fuel used, in US gallons or in litres. The other is the distance driven. The headline is the gas cost.
What does a round trip change?
It doubles the one-way distance, then prices that driven distance. One way keeps the distance you typed.
Does switching a control convert the numbers?
No. A typed 300 stays 300. Miles per gallon is not a conversion of litres per 100 kilometres. A US gallon is not an imperial gallon. Changing the currency changes the code and the decimal places. It does not convert the price.
Why is there no result?
A blank field, zero, or a negative number has no result. The same is true for a one-way distance above 100,000 or an economy or a price above 1,000.
Does this road trip calculator store my figures?
A completed result can be saved in this browser’s local history, including the trip, the one-way 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.