Gas cost calculator (miles, MPG and price per gallon)

Work out what a trip costs in fuel from distance, fuel economy and price. Km or miles, L/100 km or MPG. Runs on your device.

A gas cost question in the US usually looks like this: how far is it, what does the car get on the highway, and what is gas a gallon right now. This page opens with those three set in US units: 250 miles, 30 MPG and 3.50 per US gallon, which gives 8.333 gallons and a gas cost of 29.17. Change the miles to your own, type the MPG from your dashboard or your last fill-up, and use the price from the pump you expect to use. Tick round trip if you are coming back, and the miles double. If you are splitting a road trip with friends, enter the number of people and the cost per person appears beside the total. Tolls go in as one total for the whole trip. The numbers are still exact for other units: you can switch the economy to L/100 km or the price to litres if you are crossing a border. This page cannot predict the price of gas along the route, and it counts gas only, not wear on the car or hotel stops. Highway MPG is usually better than the combined figure, so use the figure that matches the road you will drive.

How it works

  1. Pick kilometres or miles and type the one-way distance, and tick round trip if you drive back
  2. Type your fuel economy in L/100 km, km/L or MPG, and the price of one litre or gallon
  3. Add tolls and the number of people to see the total and the cost per person

How the fuel cost of a trip is worked out

The fuel cost of a trip is the fuel the car burns multiplied by the price of that fuel. For a 500 km trip at 7.5 L/100 km you need 500 × 7.5 ÷ 100 = 37.5 litres, and at 1.80 a litre that costs 67.50. The calculator converts your fuel economy to kilometres per litre first, then divides the distance by it to get litres, then multiplies by the price per litre or per gallon. Every step is written out in the formula box under the result, so you can check it against a receipt. Type the distance in kilometres or miles and the economy in whichever unit your car handbook uses.

Round trip, tolls and sharing the cost

Tick round trip and the distance is doubled, so 500 km each way becomes 1,000 km, 75 litres and 135.00 at the same price. Tolls and parking are a single total for the whole trip and are added after the fuel cost, so they are not multiplied by the round trip tick. Enter the number of people, driver included, and the total is split evenly: 135.00 between 4 people is 33.75 each. The page shows the cost per kilometre or mile as well, which is useful when you agree a rate with a passenger or claim mileage.

Litres, US gallons and UK gallons

The unit conversions are exact definitions: 1 mile is 1.609344 km, 1 US gallon is 3.785411784 litres and 1 UK (imperial) gallon is 4.54609 litres. The UK gallon is about 20% bigger, so the same car reads 30 MPG (US) or 36.03 MPG (UK), and fuel sold per UK gallon costs more per gallon than the same fuel per US gallon. Pick the unit your pump price is quoted in. The table at the bottom shows the cost of the same trip at other fuel economies from 4 to 15 L/100 km, so you can compare a small car with a large one.

What the estimate leaves out

The result is only as good as the fuel economy you type. Handbook figures come from laboratory tests and are usually better than real driving; the most reliable number comes from filling the tank, resetting the trip meter and dividing at the next fill-up. Motorway speed, a roof box, a full load, hills, cold weather and air conditioning all raise fuel use. The page does not look up fuel prices, plan a route or add wear and depreciation, so the figure is fuel only. For fuel economy from a fill-up use the gas mileage calculator.

Frequently asked questions

How much gas does a 250 mile trip use at 30 MPG?

250 ÷ 30 = 8.333 US gallons. At 3.50 a gallon that costs 29.17, and a round trip of 500 miles uses 16.667 gallons for 58.33.

Which MPG should I use for a road trip?

Use the highway figure if most of the trip is on a highway. A car rated 25 MPG combined may do 32 MPG on a steady highway run, which turns a 400 mile trip from 16 gallons into 12.5 gallons.

How do I calculate the fuel cost of a trip?

Divide the distance by the fuel economy to get the fuel, then multiply by the price. At 7.5 L/100 km, 500 km needs 37.5 litres, and at 1.80 a litre that is 67.50. In miles, 250 miles at 30 MPG (US) is 8.333 gallons, and at 3.50 a gallon that is 29.17.

How do I work out the cost per km?

Divide the total cost by the distance. 67.50 for 500 km is 0.135 per km. The page shows the cost per kilometre or per mile for the unit you chose, with tolls included if you entered them.

How do I split fuel between passengers?

Divide the total by everyone in the car, driver included. A 1,000 km round trip costing 135.00 shared by 4 people is 33.75 each. Type the number of people and the cost per person appears.

How do I convert MPG to L/100 km?

Divide 235.215 by MPG (US) or 282.481 by MPG (UK). So 30 MPG (US) is 7.84 L/100 km and 40 MPG (UK) is 7.06 L/100 km. You do not need to convert first: pick your unit in the fuel economy list.

Does the calculator include tolls and parking?

Yes, as one optional total for the whole trip. 15.00 in tolls added to 67.50 of fuel makes an 82.50 trip. The tolls are added once, even when you tick round trip, so enter the figure for both ways.

Are my distance and prices stored or sent anywhere?

No. The numbers stay in this tab and are not stored or sent. Reloading puts the example of 500 km back. The page only counts that a result was shown, without any of your numbers.