Gas Calculator
Estimate the fuel cost of a trip from the distance, your vehicle's MPG, and the gas price — and split it among passengers.
Estimate for a one-way trip. Double the distance for a round trip. Real mileage varies with terrain, speed, and load.
How to use this calculator
Enter four pieces of information: the trip distance in miles, your vehicle's fuel efficiency in MPG, the current gas price per gallon, and the number of people splitting the cost. The calculator returns the total gallons you'll burn, the total fuel cost in dollars, and the per-person share.
For a round trip, simply double the one-way mileage before entering it. If you want the cost for one vehicle in a multi-car carpool, enter 1 for the number of people and divide the results manually.
How the gas cost formula works
Everything flows from one core relationship: fuel consumption is distance divided by efficiency. If your car gets 30 miles for every gallon of gas, then a 300-mile drive burns exactly 10 gallons — no more, no less (under controlled conditions). Multiply those 10 gallons by whatever gas costs at the pump and you have your trip fuel budget.
The MPG figure is the key variable. A car that gets 20 MPG burns 50% more fuel than one that gets 30 MPG over the same route. Over a long road trip, choosing the more efficient vehicle (or driving more efficiently) can save a meaningful amount. Splitting the cost among passengers also reduces the per-person number quickly: four people sharing a $60 fuel bill each pay $15.
Worked example — step by step
You're planning a 450-mile road trip in a car that gets 32 MPG. Gas near you is $3.80 per gallon and three friends are coming along.
- Gallons needed: 450 ÷ 32 = 14.06 gallons
- Total fuel cost: 14.06 × $3.80 = $53.44
- Per person (4 people): $53.44 ÷ 4 = $13.36 each
If gas prices along the route average closer to $4.00, the total rises to about $56.24 — only $2.80 more per person. Knowing the estimate ahead of time lets you collect cash before you leave, avoiding the awkward "who owes what" conversation at the last gas stop.
How to interpret your result
The gallons figure tells you how many fill-up stops to budget for. A typical sedan has a 12–16 gallon tank, so a trip requiring 25 gallons will need at least two fill-ups. The total cost is a planning number — gas prices fluctuate, and your actual mileage may differ from the EPA rating. Treat the result as a close estimate, not a guarantee.
The per-person cost is most useful for collecting money upfront on road trips. If everyone chips in before departure, the driver doesn't have to chase down Venmo payments later.
Common mistakes to avoid
- Using combined MPG for all-highway driving: The EPA combined rating blends city and highway. If your trip is almost entirely highway, use the highway MPG rating — it is typically 10–20% better than combined. Your dashboard trip computer is even more accurate if you reset it at the start.
- Forgetting it's one-way: The most common error is entering a one-way distance for a round trip. Double the miles if you're calculating both legs.
- Using today's local gas price for a long route: Prices can vary by 20–40 cents across states. Check GasBuddy or a similar site for prices along your specific route and use a rough average.
- Ignoring other driving costs: Fuel is only part of the per-mile cost of driving. If you're calculating whether to drive vs. fly or rent, factor in tolls, parking, and vehicle wear (typically estimated at $0.15–0.25 per mile for depreciation and maintenance).
The formula
Gallons = Distance ÷ MPG · Cost = Gallons × Price per gallon · Per person = Cost ÷ People
How we calculate this
Gallons needed = Distance ÷ MPG. Total fuel cost = Gallons × Price per gallon. Per-person cost = Total ÷ Number of people. All values are calculated at the precision you enter and rounded for display.
Frequently asked questions
How do I calculate the gas cost of a trip?
Divide the trip distance by your vehicle's fuel efficiency (MPG) to find gallons needed, then multiply by the price per gallon. For a 300-mile trip at 28 MPG with gas at $3.50/gallon: 300 ÷ 28 ≈ 10.71 gallons, and 10.71 × $3.50 ≈ $37.50.
How do I split gas costs with friends?
Enter the number of people sharing the drive and the calculator divides the total fuel cost evenly. For a $60 road trip shared among three people, each person owes $20. This works for carpools, road trips, and any shared ride.
Is this for one way or round trip?
The calculator uses whatever distance you enter. For a round trip, double the one-way mileage before typing it in. For example, a 150-mile one-way drive becomes a 300-mile round trip.
Why is my real gas cost different from the estimate?
MPG varies with speed, hills, headwinds, air conditioning use, cargo weight, and tire pressure. Highway driving usually beats the EPA combined rating while stop-and-go city driving underperforms it. Gas prices also fluctuate along long routes. Treat this as a planning estimate, not a guarantee.
Where can I find the MPG for my vehicle?
Check the window sticker MPG, your owner's manual, or the fueleconomy.gov database, which lists EPA combined, city, and highway ratings for every model year. Your actual MPG from the trip computer is usually the most accurate figure for your specific driving habits.
How do I calculate gas cost per mile?
Divide the gas price per gallon by your MPG. At $3.50/gallon and 28 MPG, you spend $3.50 ÷ 28 ≈ $0.125 per mile. Multiply that by any distance to get the fuel cost for that leg.
How do I convert L/100 km to MPG?
Divide 235.21 by the L/100 km value to get MPG. For example, 8 L/100 km ≈ 235.21 ÷ 8 ≈ 29.4 MPG. If your vehicle's efficiency is listed in km/L (common in some markets), multiply by 2.352 to get MPG.
Does idling burn a lot of gas?
A typical car burns roughly 0.2–0.5 gallons per hour of idling, depending on engine size. A 30-minute wait at a parking lot could use about 0.1–0.25 gallons. Turning the engine off for stops longer than about a minute saves fuel.