US road trip and national park tools

Gas Cost Calculator

Enter the distance and your mpg; the price fills in from the EIA weekly average for your state, and you get the trip's fuel cost.

Open on Road Trip Desk

Embed

Embed this tool

Copy this code into your website, blog or class page. The tool runs inside your page.

Please keep the credit link below the tool.

The gas cost calculator estimates how much fuel one drive will cost. Enter the distance, your fuel economy and the price per gallon or liter, and it works out the total fuel cost. It runs in your browser, is free, and needs no sign-up. The price field fills with the U.S. Energy Information Administration (EIA) weekly price for the state you pick, so you can start with a published average and change it to match the pump. Use it to plan a weekend drive, a cross-country route or an RV trip, and to see what each person owes when the cost is shared.
Gas cost calculator example

How to use the Gas Cost Calculator

  1. Enter the trip length in Distance and choose mi or km.
  2. Set Trip to One way or Round trip (same route back).
  3. Enter your vehicle’s Fuel economy and choose mpg, L/100 km or km/L.
  4. Pick a Gas price: state. The price field fills with the EIA price for that state.
  5. Choose a Fuel type: Regular gasoline or Diesel.
  6. Check Price per gallon or liter. Type your own price if the pumps near you differ, and choose $/gal or $/L.
  7. Enter the number of travelers in People sharing the cost to see the cost per person.
  8. Read Total fuel cost, then check Fuel used, Distance driven and Cost per mile.

For a trip through two states, open More options, then set Second state (optional) and Distance driven in the second state.

The presets are 300-mile weekend trip, 28 mpg; 2,800-mile cross-country, 25 mpg; RV 10 mpg, 500 miles, diesel; and 500 km, 7.5 L/100 km. Use Copy result, Copy link or Print / save as PDF to keep your numbers.

Every result updates as you type, so you can try two fuel economy figures or two states one after the other and compare the totals.

Nothing is saved until you copy a link or print.

How do I calculate gas cost for a trip?

To compute or determine the gas cost for a trip by hand, you need three numbers: the distance, your fuel economy and the price. This estimated fuel cost calculator does the same arithmetic and shows each step, so the estimated gas cost for the trip is easy to check.

Divide the distance by your fuel economy to get the gallons you will use. Then multiply the gallons by the price per gallon.

Gallons = miles ÷ mpg, and cost = gallons × price per gallon. For example, 300 mi ÷ 30 mpg = 10 gal, and 10 × $3.50 = $35.00. The tool also shows cost per mile (cost ÷ miles) and, when more than one person shares the trip, cost per person (cost ÷ people).

How much will gas cost for a 500-mile trip?

A 500-mile trip at 28 mpg uses about 17.86 gallons. At the national regular average of $4.354 per gallon, that is $77.75 one way.

Choose Round trip and the distance doubles, so the fuel and cost double too. The same 500 miles each way costs about $155.50. The price changes with the state, fuel type and your own vehicle, so run the numbers in the tool for your exact trip.

What gas price should I use?

Use the price for the state you are driving in, unless you have a price you can see at the pump. The tool fills the EIA weekly average for the state you pick.

EIA publishes its own series for 9 states: California, Colorado, Florida, Massachusetts, Minnesota, New York, Ohio, Texas and Washington. Every other state uses its region’s price, and the page names that region. Prices change weekly, so the page shows the week it was last updated. If you type a price, your price is used instead of the EIA figure. Emptying the field brings the EIA price back.

How do I split gas cost between people?

Enter the number of people in People sharing the cost. The tool divides the total fuel cost by that number and shows the result as Cost per person.

For example, a $46.65 trip shared by 2 people costs about $23.33 each. The cost per person line appears only when more than one person is entered.

Is diesel more expensive than regular?

Yes, in the EIA week shown on the page, diesel costs more. The national average was $6.199 per gallon for diesel and $4.354 for regular.

At those national prices, a 300-mile trip at 30 mpg costs $43.54 on regular and $61.99 on diesel. The regular and diesel table keeps your fuel economy the same for both rows, so the gap comes only from the price. Choose Diesel only if your vehicle runs on diesel.

Does it work in liters and kilometers?

Yes. Choose km for distance, L/100 km or km/L for fuel economy, and $/L for price.

To compare the two systems, mpg = 235.2146 ÷ (L/100 km). For example, 7.84 L/100 km is about 30.0 mpg, and 7.5 L/100 km is about 31.4 mpg. One mile equals 1.609344 km, and one US gallon equals 3.785411784 L (NIST SP 811). Changing the unit converts the filled price, and $1.00 per liter equals $3.785 per gallon. The output shows Fuel used in gallons and liters, and Distance driven in miles and kilometers.

Does it count a return trip?

Yes, when you choose Round trip (same route back). The tool doubles the distance, so it counts the fuel for the drive back as well.

A round trip needs twice the fuel of the one-way distance. A 300-mile trip each way at 28 mpg and $4.354 costs $46.65 one way and $93.30 round trip.

Worked examples

InputResult
300 mi, 28 mpg, 4.354 $/gal$46.65 for 10.71 gal (40.6 L)
2800 mi, 25 mpg, 4.354 $/gal$487.65 for 112.00 gal (424.0 L), 4 people share it
500 mi, 10 mpg, 5.819 $/gal$290.95 for 50.00 gal (189.3 L)
500 km, 7.5 L/100 km, 1.645 $/L$61.69 for 9.91 gal (37.5 L), 2 people share it
180 mi round trip, 32 mpg, 4.02 $/gal$46.71 for 11.25 gal (42.6 L), 3 people share it

Calculated by the tool above; open it with the same values to see each step.

Frequently asked questions

Does the tool include tolls, parking or car wear?

No. It works out the fuel cost of one drive from distance, fuel economy and price. Add any tolls or other costs yourself.

Does it send my numbers anywhere?

No. Everything runs in your browser, and nothing you type is sent anywhere.

Why does the page show a warning?

Warnings appear for fuel economy above 150 or below 3 mpg, a price above $15 or below $1 per gallon, or more than 20,000 miles. Check the numbers you entered if you see one.

How do I use a second state?

Open More options, set Second state (optional), and enter the miles driven there in Distance driven in the second state. That part of the distance is priced at the second state’s EIA price. A price you type applies to the first state only.

Where do the price figures come from?

They are EIA weekly retail gasoline (regular, all formulations) and No. 2 diesel prices for the week of 2026-10-05, retrieved 2026-10-13. Prices change, so check the EIA website for current figures.

What is cost per mile for?

Cost per mile is the total fuel cost divided by the miles driven. Use it to compare two routes or two vehicles on the same trip.