Everyday Utilities

Fuel Cost Calculator

Estimate the fuel cost of a trip from distance, MPG and price, or work out your MPG.

Your numbers

What do you want to find?

Enter the price at your pump. SumPanda does not look up live gas prices.

More options

Your unit choice is remembered in this browser only.

Result

Trip fuel cost

$51.75

Fuel needed
15 gal
Cost per mi
$0.12
Distance driven
420 mi
How this was calculated
  1. Gallons = miles / MPG = 420 / 28 = 15 gal.
  2. Cost = fuel x price = 15 gal x $3.45 = $51.75.
  • Real fuel use varies with speed, load, weather and traffic. Use your car's average economy for the best estimate.

Next step

How to use the fuel cost calculator

  1. Choose Fuel cost of a trip or My fuel economy (MPG).
  2. Pick US units (miles, gallons) or metric (kilometers, liters).
  3. For a trip, enter the distance, your car's fuel economy and the fuel price. Tick round trip to double the distance.
  4. To split the cost, open More options and enter the number of people.

Formula

Gallons = miles / MPG

Cost = gallons x price per gallon

MPG = miles / gallons used

Metric: liters = km x (L per 100 km) / 100

Fuel prices are entered by you because they change daily and by location. SumPanda does not look up live prices.

Worked example: a 420-mile drive

The car gets 28 MPG and gas is $3.45 a gallon. Gallons: 420 / 28 = 15. Cost: 15 x $3.45 = $51.75, which is about 12 cents a mile.

As a round trip the distance doubles to 840 miles, so the cost is $103.50. Shared by three people, that is $34.50 each.

To find your own MPG, divide miles driven by gallons added at the next fill-up: 420 miles on 14.5 gallons is 28.97 MPG.

Getting a realistic MPG

The sticker MPG is a test result. Real economy is lower in cold weather, at highway speeds above about 65 mph, with roof racks or heavy loads and in stop-and-go traffic. For the best estimate, measure your own: fill the tank, reset the trip meter, drive normally and divide miles by gallons at the next fill-up.

Ways to lower a trip's fuel cost

Keep tires inflated to the pressure on the door-jamb label, remove roof boxes when not in use, avoid hard acceleration and use cruise control on flat highways. Each can improve economy by a few percent, and the savings add up on a long drive.

Assumptions and limits

  • Fuel economy and price are constant for the whole trip.
  • Electric and hybrid vehicles can be estimated using an equivalent MPG, but charging costs are not modeled.
  • Tolls, parking and wear are not included.
  • Metric mode uses L/100 km, where a smaller number is better economy.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do I calculate gas cost for a trip?

Divide the miles by your MPG to get gallons, then multiply by the price per gallon.

How do I convert MPG to L/100 km?

Divide 235.215 by the MPG. 28 MPG is about 8.4 L/100 km. The calculator does this for you in MPG mode.

How do I split fuel costs?

Enter the number of people in More options and the calculator divides the total.