Gas Calculator

Work out how many gallons of gas a trip will use and what it will cost, based on your distance, your vehicle's fuel economy, and the local gas price.

Quick Facts

Formula
Gallons needed = distance ÷ MPG; Total cost = gallons × price per gallon
A round trip simply doubles the one-way distance before dividing by MPG.

Your Results

Calculated
Total gas cost
-
For the full trip
Gallons needed
-
Fuel required for the distance
Cost per mile
-
Fuel cost per mile driven
Cost per person
-
Split evenly among travelers

Ready

Enter your trip distance, MPG, and gas price, then press Calculate.

How the Gas Calculator works

This tool estimates the fuel a trip will burn and what it will cost, using the same arithmetic drivers use every day: distance, fuel economy, and the price of gas. Enter your trip distance, your vehicle's miles-per-gallon (MPG) rating, and the current price per gallon, and the calculator returns the gallons you'll need, the total cost, the cost per mile, and — if you're sharing the drive — the cost per person.

The formula

The math behind every result is simple division and multiplication:

  • Total distance = trip distance, doubled automatically if you select "Round trip."
  • Gallons needed = total distance ÷ vehicle fuel economy (MPG).
  • Total gas cost = gallons needed × price per gallon.
  • Cost per mile = total gas cost ÷ total distance.
  • Cost per person = total gas cost ÷ number of people splitting the cost.

Where to find your fuel economy number

Your vehicle's official MPG rating is on its window sticker (for new cars) or the EPA's fueleconomy.gov database, and most modern dashboards also display a real-time or trip-average MPG. Combined MPG (a blend of city and highway) is the best all-purpose figure; use highway MPG for trips that are mostly interstate driving and city MPG for stop-and-go routes, since highway economy is typically higher than city economy.

Practical context

This estimate assumes steady fuel economy at your entered MPG figure and a constant price per gallon for the whole trip. Real-world mileage varies with speed, terrain, load, tire pressure, and traffic, and gas prices can differ from state to state or station to station. Use the result as a planning estimate, and re-run it with your dashboard's actual trip MPG once you're partway through a long drive for a more precise figure.

Frequently Asked Questions

How is trip gas cost calculated?
Gallons needed equals total distance divided by your vehicle's fuel economy in MPG. Total cost equals gallons needed multiplied by the price per gallon. For a round trip, the one-way distance is doubled before dividing by MPG.
Should I use city, highway, or combined MPG?
Use combined MPG for a realistic mixed-driving estimate, highway MPG for mostly highway trips, and city MPG for stop-and-go driving. Your dashboard's average fuel economy display, if available, is usually the most accurate for your actual driving style.
How do I calculate cost per person for a shared trip?
Divide the total gas cost by the number of people splitting the expense. This calculator does that automatically once you set the number of travelers, splitting the cost evenly regardless of who is driving.