Cars

Gas Cost Calculator

Find out what a drive will cost in gas, one way or round trip, and how much each passenger owes. Then see what the same trip would cost in an electric car.

Your numbers

Units
miles
Trip
mpg

Combined MPG from fueleconomy.gov or your trip computer.

$ /gal

US average regular: $4.153 on Nov 2, 2026 (EIA). Use your local price.

Compare with an electric car
kWh/100 mi

Set to 0 to skip the comparison.

$ /kWh

US home average: 18.16¢ in Aug 2026 (EIA). Public fast charging costs more.

Trip fuel cost

Fuel cost for this trip

$74.11

500 miles round trip at 28 MPG and $4.15 per gallon.

Per person (2 people)

$37.05

Cost per mile

$0.15

$14.82 per 100 miles

Fuel used
17.86 gallons
Electricity an EV would use
150 kWh
At 30 kWh/100 mi
EV charging cost
$27.00
At $0.18/kWh
EV would save
$47.11
$23.55 per person

Fuel only. Tolls, parking and wear on the car are extra, and gas mileage usually falls quickly at speeds above 50 mph, so fast highway driving can cost more than this.

How it’s worked out

  1. Distance: 250 × 2 = 500 miles
  2. Fuel: 500 miles ÷ 28 MPG = 17.86 gallons
  3. Cost: 17.86 gallons × $4.15 = $74.11
  4. Per person: $74.11 ÷ 2 = $37.05

Trip cost by fuel economy (500 miles at $4.15 per gallon)

MPGGallonsTrip costPer person
1533.33$138.33$69.17
2025$103.75$51.88
2520$83.00$41.50
28 (yours)17.86$74.11$37.05
3016.67$69.17$34.58
3514.29$59.29$29.64
4012.5$51.88$25.94
5010$41.50$20.75
EV at 30 kWh/100 mi150 kWh$27.00$13.50

How to use this calculator

  1. Choose miles and MPG or kilometers and L/100 km.
  2. Enter the one-way distance and whether it’s a round trip. Mapping apps show the driving distance.
  3. Enter your car’s fuel economy. The combined rating at fueleconomy.gov is a good starting point; your trip computer is better.
  4. Enter the gas price. The default is the latest U.S. average from the Energy Information Administration, but your local price is more accurate.
  5. Enter how many people are splitting the cost.
  6. Optionally, under Compare with an electric car, enter an EV’s efficiency in kWh per 100 miles and your electricity price. Set the efficiency to 0 to hide the comparison.

You get the trip’s fuel cost, the cost per person and per mile, the working, and a table of costs at other fuel economies.

The formula

For US units:

Cost=MilesMPG×Price per gallon

For metric units, where consumption is in litres per 100 km:

Cost=km×L/100 km100×Price per litre

An electric car works the same way as the metric formula: kWh used = distance × kWh per 100 miles ÷ 100, and cost = kWh × price per kWh. The EPA’s electric vehicle label shows this kWh per 100 miles figure, and lower is better.

Worked example

Two friends drive 250 miles each way in a car that gets 28 MPG, with gas at $4.15 a gallon.

  • Distance: 250 × 2 = 500 miles
  • Fuel: 500 ÷ 28 = 17.86 gallons
  • Cost: 17.86 × $4.15 = $74.11
  • Per person: $74.11 ÷ 2 = $37.05
  • Cost per mile: about 15 cents

An electric car using 30 kWh per 100 miles would need 150 kWh for the same trip. Charged at home at 18 cents per kWh, that’s $27.00, or $47.11 less than the gas car.

For an everyday example, a 30-mile commute each way on 21 workdays a month is 1,260 miles. In the same 28 MPG car at $4.15, that’s 45 gallons and about $186.75 a month.

Cost per 100 miles

Fuel cost to drive 100 miles at different fuel economies and gas prices:

Fuel economy $3.50 a gallon $4.15 a gallon $5.00 a gallon
20 MPG $17.50 $20.75 $25.00
25 MPG $14.00 $16.60 $20.00
30 MPG $11.67 $13.83 $16.67
35 MPG $10.00 $11.86 $14.29
40 MPG $8.75 $10.38 $12.50
50 MPG $7.00 $8.30 $10.00

For an electric car, the cost per 100 miles is simply its kWh per 100 miles times the electricity price:

EV efficiency 12¢ per kWh 18¢ per kWh 40¢ per kWh
25 kWh/100 mi $3.00 $4.50 $10.00
30 kWh/100 mi $3.60 $5.40 $12.00
35 kWh/100 mi $4.20 $6.30 $14.00

The 18-cent column is close to the national residential average. The 40-cent column shows how much a higher price per kWh, such as you may pay at some public chargers, changes the picture.

About the default prices

The $4.15 gas price is the Energy Information Administration’s weekly U.S. average retail price for regular gasoline, $4.153 for the week of November 2, 2026. The 18 cents per kWh electricity price is the EIA’s average U.S. residential price, 18.16 cents for August 2026, the latest month published as of early November 2026. Both are national averages: prices in your state, and at the station or charger you use, can be quite different. Treat them as starting points and replace them with your own.

Tips to cut your fuel cost

  • Ease off on the highway. According to fueleconomy.gov, gas mileage usually decreases rapidly at speeds above 50 mph.
  • Use your real MPG. Ratings are averages; a loaded car, roof box or cold weather lowers fuel economy.
  • Split fairly. Agree before you leave whether the driver pays a share, and whether tolls and parking are split too.

If you’re weighing a new car, fuel is part of the car affordability calculator, which adds it to the loan payment, insurance and maintenance.

Assumptions and limitations

The calculator assumes a constant fuel economy and price for the whole trip. It counts fuel or electricity only, not tolls, parking, oil, tires or depreciation. The EV comparison assumes you can charge at the price you enter and doesn’t include charging losses beyond what’s in the efficiency figure you use.

Sources

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 the gallons you'll use, then multiply by the price per gallon. A 500-mile round trip in a car that gets 28 MPG uses about 17.86 gallons. At $4.15 a gallon, that's $74.11.

How do you split gas money with friends?

Divide the trip's fuel cost by the number of people sharing it, usually including the driver. Our $74.11 example split two ways is $37.05 each. Some groups also chip in for tolls, parking or wear on the car, which this calculator doesn't include.

How much does it cost to drive 100 miles?

It's 100 divided by your MPG, times the gas price. At $4.15 a gallon, 100 miles costs about $20.75 at 20 MPG, $13.83 at 30 MPG and $8.30 at 50 MPG. The table on this page shows the cost for other fuel economies and prices.

Is it cheaper to drive an electric car on a road trip?

Usually, if you charge at home. A car using 30 kWh per 100 miles needs 150 kWh for 500 miles, about $27 at 18 cents per kWh, compared with $74.11 for a 28 MPG gas car at $4.15 a gallon. Public fast charging can cost much more per kWh, so enter the price you'll actually pay.

What gas price does the calculator use?

It starts with $4.15, the U.S. average retail price for regular gasoline reported by the Energy Information Administration for the week of November 2, 2026 ($4.153). Prices vary a lot by state and change every week, so type in the price at the pumps on your route.

How do I use liters per 100 km?

Switch the units to kilometers. Fuel used is the distance times the L/100 km figure, divided by 100, and the cost is the litres times the price per litre. An 800 km round trip at 8.4 L/100 km uses 67.2 litres.

Updated November 2026. Results are estimates for educational purposes and depend on the inputs you provide.