Gas calculator

Estimate what a drive or road trip will cost in gas: enter the distance, your car’s fuel economy and the price of fuel, then split the cost between passengers. Works in miles and gallons or in kilometers and liters.

By OpenBookMoney Editors · Free, no sign-up · Updated Oct 27, 2026

Fuel cost calculator

Estimate what a drive or road trip will cost in fuel, and split it between passengers.

Round trip
Fuel cost for the round trip $82.06 22.9 gallons of fuel for 640 miles
Fuel needed 22.9 gallons
Cost per person $82.06
Cost per mile $0.128
Cost per 100 miles $12.82

How it’s calculated

US units: gallons = miles ÷ MPG. Metric: liters = km × (L/100 km) ÷ 100. Fuel cost = fuel needed × price per gallon or liter. A round trip doubles the distance.

Results are rounded for display. Estimates only.

How to use the gas calculator

  1. Choose US units (miles, MPG, price per gallon) or metric (km, liters per 100 km, price per liter).
  2. Enter the one-way distance and switch round trip on or off.
  3. Enter your car’s fuel economy and the price of fuel where you’ll fill up.
  4. Add the number of people sharing the cost.

You’ll see the fuel needed, the total cost, the cost per person and the cost per mile or kilometer.

How trip fuel cost is calculated

Gallons needed = miles ÷ MPG
Fuel cost = gallons × price per gallon
Metric: liters = km × (L/100 km) ÷ 100
Cost per mile = fuel cost ÷ miles

A round trip doubles the distance. To convert fuel economy, divide 235.215 by the MPG to get liters per 100 km.

Example: a 320-mile road trip

Driving 320 miles each way (640 miles in total) in a car that gets 28 MPG uses about 22.9 gallons. At $3.59 a gallon, the fuel costs $82.06: $41.03 each for two people, or about 12.8 cents a mile.

Hypothetical fuel price; check what fuel costs where you’ll drive.
Fuel economyGallons for 500 milesFuel cost at $3.59 a gallon
20 MPG25.0$89.75
25 MPG20.0$71.80
30 MPG16.7$59.83
35 MPG14.3$51.29
40 MPG12.5$44.88
50 MPG10.0$35.90

In metric units, 500 km in a car that uses 6.5 liters per 100 km needs 32.5 liters; at €1.75 a liter, that’s €56.88.

What your commute costs in fuel

A 30-mile commute each way, five days a week for 50 weeks, adds up to 15,000 miles a year. At 25 MPG and $3.59 a gallon that’s about 600 gallons, or $2,154 a year in fuel alone, before parking, tolls, maintenance and wear on the car.

Ways to spend less on gas

  • Drive smoothly: hard acceleration, speeding and braking waste fuel, and economy usually drops quickly at highway speeds (fueleconomy.gov).
  • Keep your tires properly inflated and the car maintained (maintenance tips).
  • Take off roof racks and extra weight you don’t need for the trip.
  • Use the most fuel-efficient car you have for long drives, and compare prices before you fill up.
  • Combine errands into one trip and share rides when you can.

Frequently asked questions

How do I calculate the gas cost for a trip?

Divide the miles by your car’s MPG to get the gallons you need, then multiply by the price per gallon. A 640-mile round trip at 28 MPG uses 22.9 gallons; at $3.59 a gallon that’s $82.06.

How much gas does a 100-mile drive use?

At 25 MPG it uses 4 gallons; at 30 MPG about 3.3 gallons. Multiply by the local price per gallon to get the cost.

How do I convert MPG to liters per 100 km?

Divide 235.215 by the MPG. For example, 28 MPG is about 8.4 liters per 100 km. The calculator converts automatically when you switch units.

Does the calculator include tolls and parking?

No. It estimates fuel only, so add tolls, parking and other trip costs separately.

What does driving cost per mile?

In fuel alone, divide the price per gallon by your MPG: $3.59 ÷ 28 MPG is about 13 cents a mile. Owning a car also costs insurance, maintenance, repairs and depreciation, so the full cost per mile is much higher.

Add this calculator to your website

Free for blogs, schools, newsrooms and businesses. Copy the code and paste it into your page’s HTML; please keep the credit link.

The calculator works on phones too and adjusts its height automatically.

Estimates fuel cost only. Real fuel use varies with speed, traffic, weather and load.