How to Calculate Gas Cost for a Road Trip

You need three numbers: how far you’re driving, how many miles your car goes on a gallon, and what a gallon costs. Everything else is arithmetic.

Gas cost = (miles ÷ MPG) × price per gallon

A worked example

Say you’re driving 450 miles in a car that gets 30 MPG, and gas costs $4.284 a gallon, this week’s national average.

  1. Gallons needed: 450 ÷ 30 = 15 gallons.
  2. Cost: 15 × $4.284 = $64.26.

Only round at the very end. Gas prices are posted to a tenth of a cent, and rounding the price first can throw the total off by a few cents on a short trip and more on a long one.

Dividing the total by the miles gives the cost of each mile, $64.26 ÷ 450 here. The gas cost per mile calculator works that out for any MPG, along with your monthly fuel bill.

Round trips and splitting the cost

For a round trip, double the miles before you divide. To split the bill, divide the total by the number of people sharing it. The same 450-mile drive there and back with three people sharing:

  1. Miles: 450 × 2 = 900.
  2. Gallons: 900 ÷ 30 = 30 gallons.
  3. Total: 30 × $4.284 = $128.52.
  4. Each person: $128.52 ÷ 3 = $42.84.

Where to find each number

  • Miles: your maps app shows the driving distance for the route you’ll actually take. Use that rather than a straight-line distance, which is typically about 15% shorter than the road.
  • MPG: the window sticker, owner’s manual or your dashboard’s trip computer. For long highway trips the highway figure is closer to reality; for mixed driving use the combined figure. Measuring it yourself over a few tanks is best of all.
  • Gas price: what you pay at your usual station, or a weekly average. Prices vary a lot by state, so on a long trip an average of the states you’ll cross is more accurate than your local price.

Why your real cost may come out higher

Rated MPG assumes gentle driving. High speeds, a loaded car, roof boxes, air conditioning in heat, cold weather and stop-and-go traffic all lower it. Adding 10% to your estimate is a sensible cushion for a long trip.

Skip the arithmetic: the road trip gas calculator does all of this as you type, including round trips and splitting the cost.

Sources and method

Fuel prices are weekly retail averages including taxes from the U.S. Energy Information Administration. Driving distances between cities come from OSRM using © OpenStreetMap contributors data. Fuel economy figures are typical real-world values that PumpTally uses as calculator starting points, not manufacturer ratings; your own vehicle may do better or worse. Every table on this page is recalculated each week when prices update.

More guides