Fuel cost calculator

Enter the distance, your car's mpg and the local gas price to see what the drive costs, per mile and per person.

  1. Miles driven240.0
  2. Fuel used at 28 mpggallons8.571
  3. Price per gallon$3.45
  4. Cost per mile$0.12
Fuel for the trip $29.57

Last updated 13 Sep 2026.

How to use it

  1. Enter the one-way distance and turn on round trip if you're coming back.
  2. Enter your car's real-world mpg. The trip computer's long-term average is more honest than the sticker figure.
  3. Enter the local price per gallon and, if you're splitting the cost, how many people are in the car.
  4. Read the fuel cost for the trip, and the cost per mile for mileage claims or comparing with a train ticket.

Worked example

240 miles each way at 28 mpg with gas at $3.45, round trip, three people.

480 miles ÷ 28 = 17.143 gallons × $3.45 = $59.14, which is 12.3 cents a mile, or $19.71 each.

How it's calculated

miles = distance × 2 for a round trip

gallons = miles ÷ mpg

cost = gallons × price per gallon

cost per mile = cost ÷ miles; per person = cost ÷ people

This is fuel only. The IRS standard mileage rate, which also covers wear, tyres, insurance and depreciation, runs about three to four times the fuel cost alone.

FAQ

What mpg should I use?

Your real average, not the EPA sticker. Highway driving at a steady 65 mph usually beats the combined figure; a loaded car with a roof box at 80 mph falls well short. Most cars show a long-term average on the trip computer.

How do I convert litres per 100 km?

Divide 235.215 by the L/100 km figure to get US mpg. 8 L/100 km is 29.4 mpg. For UK mpg, use 282.481 instead, because the imperial gallon is bigger.

Does this work for electric cars?

Use the same idea with different units: miles ÷ miles-per-kWh × price per kWh. A car doing 3.5 mi/kWh on a $0.15 rate costs about 4.3 cents a mile, which you can compare with the cost-per-mile row here.

Is the fuel cost what I should charge a passenger?

It's a floor. Sharing fuel only is common among friends; ride-share apps and mileage-reimbursement rates include wear and depreciation and come out much higher.