Gas Calculator: Fuel Cost Calculator

Work out how much gas a trip will take and what it will cost, split the cost between riders, check your car’s real gas mileage, and see what your commute costs each year. Works in miles and gallons or kilometers and liters.

  • Trip and round trip
  • MPG and L/100 km
  • Commute cost per year

Gas Calculator

Fuel cost for a trip, your car’s gas mileage, or your yearly commute.

Units
mi
$/gal
Trip
mi
gal
$/gal
mi
mpg
$/gal

Gas cost

–

––
––
––

Your numbers stay in your browser. Nothing is sent or saved.

How to Calculate Gas Cost for a Trip

Gallons needed = trip miles ÷ miles per gallon Gas cost = gallons needed × price per gallon Example: 300-mile trip, 28 mpg, $3.20 a gallon 300 ÷ 28 = 10.71 gallons × $3.20 = $34.29 one way, $68.57 round trip

In metric units: liters = kilometers × (liters per 100 km) ÷ 100, then multiply by the price per liter. A 500 km trip at 6.5 L/100 km uses 32.5 liters.

Use your car’s real-world mileage for the best estimate. The official EPA rating on FuelEconomy.gov is a good starting point, but highway speed, air conditioning, cargo and towing all lower it.

Gas Cost by Distance and MPG

At $3.20 a gallon, one way:

Trip distance20 mpg25 mpg30 mpg40 mpg
50 miles$8.00$6.40$5.33$4.00
100 miles$16.00$12.80$10.67$8.00
250 miles$40.00$32.00$26.67$20.00
500 miles$80.00$64.00$53.33$40.00
1,000 miles$160.00$128.00$106.67$80.00

How to Calculate Gas Mileage (MPG)

  1. Fill the tank and reset the trip odometer.
  2. Drive as usual until the tank is at least half empty.
  3. Fill up again and note the gallons it took and the miles on the trip meter.
  4. Divide miles by gallons. 350 miles ÷ 12.5 gallons = 28 mpg.

Repeat over two or three tanks and average them; a single fill-up can be off because pumps shut off at slightly different levels.

MPG to L/100 km Conversion

Miles per gallonLiters per 100 kmKilometers per liter
1515.76.38
2011.88.50
259.410.63
307.812.75
356.714.88
405.917.01
504.721.26

L/100 km = 235.215 ÷ mpg, using 1 gallon = 3.785411784 liters and 1 mile = 1.609344 km. Lower L/100 km is better, while higher mpg is better.

How to Lower Your Gas Cost

  • Drive smoothly. Speeding, hard acceleration and hard braking can lower gas mileage by about 15–30% on the highway and 10–40% in stop-and-go traffic, according to FuelEconomy.gov.
  • Avoid long idling. An idling engine can burn a quarter to a half gallon of fuel per hour.
  • Share the ride. Splitting a $70 round trip four ways is $17.50 each; enter the number of people in the calculator.
  • Compare commuting costs. The commute tab shows what a daily drive costs in a year, which helps when comparing jobs; pair it with the salary calculator or the hourly paycheck calculator.

Frequently Asked Questions

How do I calculate gas cost for a trip?

Divide the trip distance by your car’s miles per gallon, then multiply by the price per gallon. 300 miles at 28 mpg and $3.20 a gallon costs about $34.29.

How much gas will I use for 60 miles?

60 ÷ your mpg. At 25 mpg that is 2.4 gallons; at 30 mpg it is 2 gallons.

How much does it cost to fill 20 gallons of gas?

20 times the price per gallon: $64 at $3.20 or $70 at $3.50.

What is the formula for fuel cost per mile?

Price per gallon ÷ miles per gallon. At $3.20 and 28 mpg, gas costs about 11.4 cents a mile.

How do I convert mpg to L/100 km?

Divide 235.215 by the mpg. 30 mpg equals about 7.8 L/100 km.

Does a round trip double the gas cost?

Yes, when you drive the same route back. Choose Round trip in the calculator.

Related Calculators

Sources

  • U.S. Department of Energy and EPA, FuelEconomy.gov. Find and compare cars (official EPA mpg ratings).
  • U.S. Department of Energy and EPA, FuelEconomy.gov. Driving More Efficiently (aggressive driving lowers gas mileage by about 15–30% at highway speeds and 10–40% in stop-and-go traffic).
  • U.S. Department of Energy and EPA, FuelEconomy.gov. Idling Reduction (idling can use a quarter to a half gallon of fuel per hour).
  • National Institute of Standards and Technology. NIST Handbook 44, Appendix C (1 U.S. gallon = 3.785411784 liters; 1 mile = 1.609344 kilometers).

Estimates only. Real fuel use depends on speed, traffic, weather, load and vehicle condition, and gas prices change daily.

Scroll to Top