How to use the gas cost calculator
- Distance — the one-way driving distance from a map app. Tick Round trip to double it.
- Fuel economy — your car's miles per gallon. The EPA rating is on the window sticker and at fueleconomy.gov, but your own measured figure is better.
- Gas price — the price per gallon you expect to pay along the route.
- Split between — the number of people sharing the cost, including the driver if they pay a share.
The formula
gallons = miles ÷ mpg, then trip cost = gallons × price per gallon.
Cost per person is the trip cost divided by the number of people, and cost per mile is simply price ÷ mpg — it doesn't depend on the distance at all.
Worked example: a weekend road trip
Four friends drive 280 miles each way in a car that gets 32 mpg, with gas at $3.29 a gallon:
- Round trip: 280 × 2 = 560 miles.
- Fuel: 560 ÷ 32 = 17.5 gallons.
- Cost: 17.5 × $3.29 = $57.58, or $14.39 each.
- Cost per mile: $3.29 ÷ 32 ≈ 10.3 cents.
How fuel economy changes the cost
Fuel use is the inverse of mpg, so each extra mile per gallon saves less than the one before. Here's the fuel for 1,000 miles at $3.50 a gallon:
| Fuel economy | Gallons per 1,000 miles | Cost per 1,000 miles |
|---|---|---|
| 20 mpg | 50 | $175.00 |
| 25 mpg | 40 | $140.00 |
| 30 mpg | 33.33 | $116.67 |
| 40 mpg | 25 | $87.50 |
| 50 mpg | 20 | $70.00 |
Going from 20 to 25 mpg saves $35 per 1,000 miles; going from 40 to 50 mpg saves only $17.50. When comparing cars, gallons per 100 miles is a more honest measure than mpg.
Getting a realistic MPG
- Measure your own: fill the tank, reset the trip odometer, drive normally, then fill up again. Miles driven ÷ gallons added is your real fuel economy.
- Speed matters: aerodynamic drag rises with the square of speed, so most cars use noticeably more fuel per mile at 75 mph than at 60.
- Load and accessories: a full car, a roof box, a bike rack or a trailer all lower mpg, and so does heavy air-conditioning use.
- Terrain and traffic: mountain passes and stop-and-go city driving use more fuel than flat, steady highway miles.
If you're unsure, use a slightly lower mpg and a slightly higher gas price than you expect — it's better to budget a little high.
Gas isn't the whole cost of driving
Fuel is only one part of what a mile costs. Tires, oil changes, repairs, insurance and depreciation add more, which is why the IRS standard mileage rate for business driving is several times the fuel cost per mile you see here. If you borrow a friend's car for a long trip, consider contributing more than the gas. Tolls and parking aren't included in this estimate either; add them separately when planning a travel budget.
Frequently asked questions
How do I calculate the gas cost of a trip?
Divide the distance by your car’s miles per gallon to get gallons, then multiply by the price per gallon. A 400-mile trip at 25 mpg uses 16 gallons; at $3.40 a gallon that is $54.40.
How many gallons of gas will I use?
Miles divided by mpg. A 150-mile drive in a car that gets 30 mpg uses 5 gallons.
How should we split gas money fairly?
The simplest way is to divide the total fuel cost equally among everyone in the car, including the driver. Some groups have passengers cover the gas while the driver covers wear and tear on the car.
What is my fuel cost per mile?
Divide the gas price by your mpg. At $3.50 a gallon and 28 mpg, each mile costs 12.5 cents in fuel.
Does the estimate include tolls or parking?
No. It covers fuel only. Add tolls, parking and any other trip costs separately.
Last updated: October 8, 2026