miles ÷ mpg × price

Gas Cost Calculator

Enter the distance, your car's fuel economy and the price of gas to see what a drive costs — one way or round trip, per mile and split between passengers.

gas for the trip$57.1417.9 gallons for 500 miles · $0.11 per mile
Per person$57.14
Per 100 miles$11.43

How it adds up

Distance (round trip)500 mi
Fuel used17.86 gal
Fuel cost$57.14
Cost per mile$0.11

Same trip, different car

Trip cost by fuel economy
Fuel economyFuel cost
20 mpg$80.00
25 mpg$64.00
30 mpg$53.33
35 mpg$45.71
40 mpg$40.00
50 mpg$32.00

What this calculator does

It answers a simple question: how much fuel will this drive cost? Enter the distance, your car’s fuel economy and the price of gas, and it returns the gallons used, the cost one way and round trip, and your fuel cost per mile. It also works for a monthly or yearly budget if you enter the miles you drive in that period.

How to use it

  1. Distance. One-way miles from a map app. Turn on the round-trip option if you are coming back the same way.
  2. Fuel economy (MPG). Your car’s real-world miles per gallon. If you do not know it, look up the EPA rating for your model on fueleconomy.gov, the official U.S. government fuel economy site run by the Department of Energy and EPA.
  3. Gas price. What you expect to pay per gallon along the route. Prices vary by state and by station, so use a figure from where you will actually fill up. The U.S. Energy Information Administration publishes weekly regional averages in its gasoline and diesel fuel update if you want a reference point.
  4. People splitting the cost (optional). Enter how many people are sharing the drive to see each person’s share.

How the math works

There are only two steps:

  • Gallons = miles ÷ MPG
  • Cost = gallons × price per gallon

Cost per mile is the price divided by MPG. That number is useful on its own: once you know it, any distance is easy to price.

Fuel economy Price per gallon Fuel cost per mile 300 miles
22 mpg $3.20 14.5 cents $43.64
28 mpg $3.20 11.4 cents $34.29
35 mpg $3.20 9.1 cents $27.43

Two scenarios

Weekend trip. You drive 300 miles each way in a car that gets 28 mpg, with gas at $3.20. One way uses about 10.7 gallons and costs $34.29; the round trip is $68.57. If the car is loaded and you cruise at high speed, real mileage could drop. At 15% below the rating, the one-way cost rises to about $40.34.

Comparing two cars for a commute. You drive 15,000 miles a year and gas averages $3.50. A 25-mpg car burns 600 gallons, or $2,100 a year. A 35-mpg car burns about 429 gallons, or $1,500. The difference is $600 a year in fuel. Put that next to the difference in monthly payment in the car payment calculator before deciding the more efficient car is worth a higher price.

Why your real cost can differ

  • Speed. Most cars lose efficiency at highway speeds above the rating’s assumptions, and the loss grows quickly the faster you go.
  • Load and drag. Passengers, cargo, towing and roof racks all raise fuel use.
  • Weather and terrain. Cold starts, air conditioning, headwinds and hills lower MPG.
  • Idling and traffic. Stop-and-go driving is closer to the city rating than the highway one.
  • Price changes along the route. Gas can cost noticeably more near highway exits and in some states, so a long trip may average more than the price at home.

Fuel cost vs total driving cost

Fuel is only part of what driving costs. The IRS standard mileage rate for business (72.5 cents a mile for the first half of 2026 and 76 cents from July 1) is meant to cover gas, wear, insurance and depreciation together. If you are being reimbursed for work driving, use the mileage reimbursement calculator. If you are deciding on a new car, also look at the tax and fees in the car sales tax calculator, and see the other Cars & Driving tools.

Questions

How do I calculate gas cost for a trip?

Divide the distance by your car's miles per gallon to get gallons, then multiply by the price per gallon. A 300-mile trip in a car that gets 28 mpg uses about 10.7 gallons; at $3.20 a gallon that is $34.29 one way and $68.57 round trip.

How do I find my car's real MPG?

Fill the tank, reset the trip meter, drive normally, then fill up again and divide the miles driven by the gallons it took to refill. Do it over two or three tanks for a steadier number. The EPA rating on fueleconomy.gov is a good starting point if you have not measured it.

What is my gas cost per mile?

Price per gallon divided by MPG. At $3.50 a gallon and 25 mpg, fuel costs 14 cents a mile; at 35 mpg it falls to 10 cents a mile.

Should I use city or highway MPG for a road trip?

Use highway MPG for long interstate drives and combined MPG for a mix of town and highway. Mountain driving, heavy loads, roof boxes and high speeds can all push real mileage below the highway rating.

How should friends split gas money on a road trip?

Calculate the round-trip fuel cost and divide by the number of people. A $68.57 round trip split four ways is about $17.14 each. Add tolls and parking to the total first if you are sharing those too.

Is gas cost the same as the IRS mileage rate?

No. The IRS business rate (76 cents a mile from July 1, 2026) covers gas plus depreciation, insurance and maintenance. Fuel alone is usually a small fraction of that, so do not use the IRS rate to estimate a fuel budget.

Sources

  1. U.S. Department of Energy / EPA: fueleconomy.gov · official MPG ratings by model
  2. U.S. Energy Information Administration: Gasoline and diesel fuel update · weekly average pump prices

Checked against the 2026 rules. How we calculate