How to Calculate Gas Cost for a Road Trip
The three-number formula for fuel cost, a worked example, and why your real bill usually comes in 10–15% higher than the estimate.
By The Xilfy Team 4 min read
Try it: Gas Cost Calculator
Fuel cost of any road trip from this week’s gas price by state, your mpg and the distance, plus a gas mileage calculator
Planning a road trip? Fuel is usually the biggest cost you can actually predict. With three numbers (the distance, your car's mileage and the price of gas), you can work it out to within a few dollars before you leave. This guide shows the formula, a worked example, and the small things that make real-world costs higher than the estimate.
The formula
Gallons needed = miles ÷ miles per gallon (mpg) Fuel cost = gallons needed × price per gallon
Or in one line:
Fuel cost = miles ÷ mpg × price per gallon
A worked example
Say you're driving 450 miles each way, so 900 miles in total, in a car that gets 30 mpg, with regular gas at $3.20 a gallon.
- Gallons needed: 900 ÷ 30 = 30 gallons
- Fuel cost: 30 × $3.20 = $96.00
Splitting it four ways? That is $24 each.
Change one number and see how much it matters:
| Change | New cost |
|---|---|
| Car gets 25 mpg instead of 30 | $115.20 |
| Car gets 40 mpg instead of 30 | $72.00 |
| Gas is $3.80 instead of $3.20 | $114.00 |
| Premium fuel at $4.10 | $123.00 |

Mileage makes the biggest difference. That is why the same trip can cost one family twice what it costs another.
Our gas cost calculator fills in the latest weekly average gas price for your state from the US Energy Information Administration (EIA). It also handles round trips and splits the cost between passengers.
Finding your real mpg
The mpg on the sticker (the EPA estimate) is a lab figure. Your real-world number is usually a little lower, especially at highway speeds above 65 mph. To find yours:
- Fill the tank and reset the trip meter.
- Drive normally until the tank is about half empty.
- Fill up again and note how many gallons it took.
- Divide the miles on the trip meter by those gallons.
If you can't measure it, use the EPA highway figure for a road trip, then knock off around 10% to stay on the safe side.
Why the real cost is usually higher
Even with an accurate formula, a few things push the final bill up:
- Speed. Fuel economy drops quickly above about 50–60 mph. Driving 75 instead of 65 can cut your mpg noticeably.
- Load and roof boxes. A full car, a roof box or a bike rack adds weight and drag.
- Air conditioning on hot days.
- City driving at the destination. Stop-and-go traffic uses more fuel per mile than the highway.
- Price differences along the route. Gas prices vary a lot by region. West Coast prices, especially in California, are usually well above the national average, while Gulf Coast states tend to be cheapest.
A sensible budget is the formula's answer plus 10–15%.
Diesel, hybrids and electric cars
- Diesel: use the same formula with your diesel mpg and the diesel price per gallon. Diesel usually costs more per gallon but goes further per gallon.
- Hybrids: use your real highway mpg. Hybrids gain the most in city driving, so their highway advantage is smaller.
- Electric cars: swap gallons for kilowatt-hours. Cost = miles ÷ miles per kWh × price per kWh. Public fast chargers cost far more per kWh than charging at home.
Frequently asked questions
How do I calculate gas cost for a round trip?
Double the one-way distance before dividing by your mpg. A 300-mile trip each way is 600 miles in total.
How do I split gas money fairly?
Divide the total fuel cost by the number of people sharing the ride. If someone joins for only part of the trip, split each leg separately.
Is it cheaper to drive or fly?
For one person, flying is often comparable on long routes. For two or more people sharing a car, driving usually wins on fuel cost alone. Remember to add tolls, parking and any overnight stops.
What's a good mpg for a road trip car?
Many modern sedans get 30–40 mpg on the highway, and hybrids can do better. Large SUVs and pickups often get 18–25 mpg.
Gas prices in our calculator come from the EIA's Weekly Retail Gasoline and Diesel Prices, updated every week. The prices in this guide are examples to show the maths, not current prices.
More guides
- US Sales Tax by State: How It Works and How to Calculate It Why the price on the shelf isn’t what you pay, which states charge the most and least, and the simple formula for any purchase.
- UK Holiday Entitlement: How Much Paid Leave Are You Owed? The 5.6-week rule in plain English, for full-time, part-time, zero-hours and irregular-hours workers, with tables and examples.
- The Schengen 90/180 Rule Explained, With Real Examples How the rolling 180-day window works, which countries count, and two worked examples so you never overstay in Europe by accident.