Gas Cost Calculator: Trip Fuel Cost from Miles, MPG and Gas Price

Enter the distance, your car’s MPG and the gas price to see how much fuel a trip will cost and how to split it. A 300-mile drive each way (600 miles round trip) in a car that gets 25 MPG uses 24 gallons; at the national average of $4.36 a gallon that is $104.64.

Gas Cost Calculator

Default price: AAA national average for regular, October 8, 2026

miles
Trip
MPG
$/gal
$
Fuel cost
–
Total distance
–
Gallons needed
–
Cost per mile
–
Total with tolls/parking
–
Cost per person
–

The formula

  • Gallons = miles ÷ MPG
  • Fuel cost = gallons × price per gallon
  • Cost per mile = price per gallon ÷ MPG

Cost per 100 miles at $4.36 a gallon

Fuel economyGallons per 100 milesCost per 100 miles
15 MPG6.7$29.07
20 MPG5.0$21.80
25 MPG4.0$17.44
30 MPG3.3$14.53
40 MPG2.5$10.90

Going from 20 to 30 MPG saves about $7.27 every 100 miles, or roughly $872 a year if you drive 12,000 miles.

Monthly commute example

A 20-mile commute each way is 40 miles a day. At 25 MPG and $4.36 a gallon that costs $6.98 a day, or about $146.50 for 21 workdays. Enter 20 miles, round trip and then multiply by your workdays, or use the cost-per-mile figure.

Getting an accurate MPG

Window-sticker MPG is measured in lab tests. For your real number, fill the tank, reset the trip meter, drive normally, then divide the miles driven by the gallons needed to refill. Highway driving, steady speeds and correct tire pressure all help.

FAQ

Where does the default gas price come from?

It is the AAA national average for regular unleaded on October 8, 2026 ($4.36). Prices vary a lot by state, so enter the price at your station for the best estimate.

Does this work for diesel or electric cars?

For diesel, enter the diesel price and your MPG. For electric vehicles, cost depends on kilowatt-hours per mile and your electricity rate, which this calculator does not model.

Related calculators

Sources

Figures current as of October 12, 2026

Each formula is checked against a separate test sheet with at least three worked examples. Results are estimates based on the numbers you enter and the published rules; your actual figures may differ. This is general information, not financial or tax advice.

Spotted a mistake? Contact us and we will fix it and update the date above.

Scroll to Top