Driving Cost Calculator

The fuel cost of a drive comes down to three numbers: how far you go, how many miles your car gets per gallon, and the price you pay per gallon. This calculator divides distance by fuel economy to find the gallons used, multiplies by your fuel price to find the trip cost, and reports the cost per mile and the cost per person when you share the ride. Enter your own figures, including a current pump price, and the result reflects your trip exactly.

0.00
0.00
0.00
0.00

Driving cost formula

Gallons used = distance / fuel economy (MPG)
Trip fuel cost = gallons used * price per gallon
Cost per mile = price per gallon / fuel economy
Cost per person = trip fuel cost / people sharing

Dividing distance by MPG gives gallons, and multiplying by the pump price gives the trip cost. Cost per mile is simply the fuel price divided by your economy, a handy figure for any distance.

Driving cost context

  • The US EPA and Department of Energy publish vehicle fuel economy at fueleconomy.gov.
  • The US Energy Information Administration reports weekly average retail gasoline prices.
  • Real-world MPG often differs from the EPA rating depending on driving style and conditions.
  • Cost per mile is the fuel price divided by MPG, independent of trip length.
  • This tool covers fuel only; maintenance, depreciation and tolls are separate costs.

Driving cost: frequently asked questions

How do I calculate the fuel cost of a trip?

Gallons used equals trip distance in miles divided by your vehicle's fuel economy in miles per gallon. Trip cost equals gallons used times the price per gallon. For a 300-mile trip at 30 MPG and US$3.50 per gallon: 300 / 30 = 10 gallons, times US$3.50 = US$35.00.

What fuel economy should I enter?

Use your vehicle's real-world miles per gallon, which you can measure by dividing miles driven by gallons filled, or take the EPA combined rating from the window sticker or fueleconomy.gov. City driving usually returns fewer MPG than highway, so your actual figure may differ from the rating.

How is cost per mile found?

Cost per mile equals the price per gallon divided by your miles per gallon. At US$3.50 per gallon and 30 MPG, that is about US$0.117 per mile. Multiplying cost per mile by any distance gives the fuel cost for that distance.

Does this include a round trip?

Enter the total distance you will drive. For a round trip, double the one-way distance before entering it, or set the round-trip toggle in your own planning. The calculator multiplies whatever distance you provide, so the result matches the miles you actually drive.

What about a per-person cost when carpooling?

Enter the number of passengers sharing the cost. The calculator divides the total trip fuel cost by the number of people to show the cost each. Sharing a ride is one of the simplest ways to cut your per-person driving cost on a long trip.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.