Vehicle
Trip cost
–
Fuel used–
Cost per person–
Cost per mile–
Total distance–

Gas cost formula

Gallons = miles ÷ mpg
Cost = gallons × price per gallon

In metric: liters = km × (L/100 km) ÷ 100, and cost = liters × price per liter. For a 500 km drive at 7 L/100 km and €1.75 per liter: 35 liters, €61.25.

Tips to save on gas

  • Drive at steady speeds: fuel economy usually drops quickly above 50–60 mph.
  • Keep tires properly inflated and remove roof racks when you don't need them.
  • Avoid long idling, and combine short errands into one trip.
  • Compare prices with a gas price app; prices can vary 30 cents or more a gallon in the same area.

Need to convert distances or volumes? Use the unit converter. Splitting other costs? Try the tip calculator.

Last reviewed October 2026.

Frequently asked questions

How do I calculate the gas cost of a trip?

Divide the trip distance by your car's miles per gallon to get the gallons used, then multiply by the price per gallon. A 300-mile trip in a car that gets 30 mpg uses 10 gallons; at $3.50 a gallon that costs $35.

Where do I find my car's mpg?

Check your car's trip computer, the window sticker, or fueleconomy.gov. Real-world mileage is often lower than the rated number, especially at high highway speeds, in cold weather, with heavy loads or with a roof box.

Can I use liters and kilometers?

Yes. Choose kilometers and L/100 km (or km per liter), and enter the price per liter. The calculator converts everything for you.

How do I split gas money with friends?

Enter the number of people sharing the ride and the calculator divides the total cost evenly. Some groups also add tolls and parking to the total before splitting.

What about electric cars?

For an EV, use the "Electric" option: enter efficiency in miles per kWh (most EVs get about 3 to 4) and your electricity price per kWh. Home charging is usually much cheaper per mile than gas; fast charging costs more.