Article — Gas Calculator (Trip Cost)
Gas calculator: trip cost, gallons, and per-mile economics
A gas calculator turns three numbers — distance, MPG, and price per gallon — into trip cost. The core formula is gallons = distance ÷ MPG, then cost = gallons × price. A 300-mile drive in a 25 MPG car at $3.50 per gallon burns 12 gallons and costs $42. Add a passenger count and you have the split for any road trip.
This page calculates total trip cost, gallons consumed, cost per mile, and cost per passenger. It supports miles or kilometers, multiple currencies, and vehicle MPG presets. The math is straightforward; the value is in seeing all four outputs at once so you can budget the drive in 30 seconds.
What the gas calculator tells you
The trip cost answer is the headline number — what you will pay at the pump. The gallons figure tells you whether the tank can handle the drive without a refill. Cost per mile is the right number to compare driving against flying, taking the train, or staying home. Cost per passenger is what you charge if you are giving a ride.
The cost-per-mile output is more useful than total cost for long-term planning. At 25 MPG and $3.50 per gallon, every mile costs 14 cents. Multiply by annual miles (the average US driver does about 13,500 miles per year according to the Federal Highway Administration) and you have your annual fuel budget: $1,890 in this case.
The 2008 US gasoline price peak hit $4.11 per gallon, the 2022 peak hit $5.06, and the 2020 COVID low touched $1.77. Annual average prices have ranged from $2.17 (2020) to $3.95 (2022). Treat any specific price as a snapshot; check AAA or the EIA for current numbers.
How to calculate gas for a trip
The gas math has three steps. Step one: gallons needed equals distance in miles divided by MPG. Step two: total cost equals gallons times price per gallon. Step three: cost per mile equals price divided by MPG (a constant for a given car and a given gas price). That third number is independent of trip length and useful for any back-of-envelope comparison.
- Gallons = trip miles ÷ MPG
- Total cost = gallons × price per gallon
- Cost per mile = price per gallon ÷ MPG
- Cost per passenger = total cost ÷ number of people
- L/100km from MPG = 235.215 ÷ MPG (US gallon basis)
- Kilometers to miles = km ÷ 1.60934
How to use this gas calculator
Enter trip distance (miles or km), MPG (or pick a vehicle preset), and gas price in dollars per gallon. Optionally enter the passenger count to split the cost. The result panel updates as you type. The vehicle presets cover compact (32 MPG), sedan (26), SUV (22), pickup truck (18), and hybrid (50) — pick the closest match if you do not know your exact rating.
A worked example for a 500-mile round trip: a 30 MPG sedan at $3.40/gal uses 500 / 30 = 16.7 gallons, totals $56.78, costs 11.3 cents per mile, and splits to $14.20 per passenger across four people. Same trip in a 20 MPG SUV: 25 gallons, $85, 17 cents per mile, $21.25 per passenger. The SUV costs 50% more for the same trip.
gallons distance ÷ MPGcost gallons × pricecost/mile price ÷ MPGper passenger cost ÷ NTypical MPG and gas prices
EPA combined fuel economy ratings are the standard reference. Subcompacts and hybrids land at 35-55 MPG; compact cars at 30-35; mid-size sedans at 26-30; SUVs at 22-26; pickup trucks at 17-22. Most plug-in hybrids return 40-50 MPG in their gas-only mode, plus electric range that you do not pay for at the pump.
US regular gasoline prices vary by state and season. As of 2024 the national average runs $3.20-$3.60, with California and Hawaii regularly above $4.50 and southern states like Mississippi and Texas often below $3. The EIA's weekly retail gasoline price report is the canonical source. AAA's gas price map updates daily and breaks down by state, county, and metropolitan area.
Splitting gas costs with passengers
Splitting fuel between passengers is the simplest road-trip math there is — total cost divided by number of people. Some splits include the driver and some do not; agree before the trip. Most carpool conventions in the US include the driver in the split because the driver is providing the vehicle (a much larger cost than the fuel) and the time.
For longer trips with multiple drivers or vehicles, the AAA per-mile total cost number ($0.72 in 2024, covering fuel, insurance, depreciation, maintenance, and registration) is a fairer reimbursement basis than fuel alone. The IRS mileage rate ($0.67 per business mile in 2024) is the formal alternative.
What cuts real-world gas mileage
EPA combined MPG is a lab-test average. Real-world driving usually returns 10-20% lower. The big factors: highway speeds above 65 mph cost 2-3 MPG per 5 mph increase; aggressive acceleration and braking cost 10-30%; cold weather cuts MPG by 10-20% in city driving (per the US Department of Energy); a roof box cuts 5-15%; underinflated tires cost about 3%; running the air conditioner costs 1-4 MPG. None of these are huge alone, but they stack.
If your car is rated 30 MPG combined but you mostly drive in city traffic with AC on, expect 24-26 MPG for trip planning. Using sticker MPG underbudgets fuel by 15-20%. Track your real MPG over a few tanks and use that number — it is usually a small but consistent shortfall.
Beyond gas: the full trip cost
Fuel is the most visible road-trip cost but not the largest. The AAA Your Driving Costs report puts the full cost of operating an average new car at about 72 cents per mile in 2024, with fuel accounting for roughly 17-20 cents of that. Depreciation, insurance, maintenance, and registration make up the rest. For a 1,000-mile round trip, fuel might be $150 but the all-in cost is closer to $720.
That distinction matters when comparing road trips to flights. A $200 flight that saves you 14 hours of driving against a $700 all-in road trip looks like a good deal. Using only the $150 fuel cost makes the math look the other way. For most casual comparisons, fuel cost is fine; for serious trip-versus-flight decisions, run both numbers.