Skip to main content

Free Online Fuel Cost Calculator

Calculate gas cost for any trip distance

Pro tip: your real-world MPG is usually 10–15% worse than the EPA rating.

12.00

Fuel Needed (gallons)

$42.00

Total Trip Cost

$0.140

Cost per mile

Processed locally
Zero server requests
Works offline
Nothing leaves your device

Why use Fuel Cost Calculator

  • Road-trip planners can budget fuel expenses before leaving by entering the round-trip distance and current gas price.
  • One-click toggle between US (MPG, gallons, dollars) and metric (L/100km, liters) units covers drivers in any country.
  • Commuters can calculate their weekly or monthly fuel spend by multiplying the per-trip cost -useful for budgeting or comparing against transit passes.
  • Side-by-side comparison of two vehicles is easy: run the calculator once for each car's MPG to see the cost difference over the same route.

How it works

In US mode the calculator divides trip distance (miles) by fuel efficiency (MPG) to get gallons needed, then multiplies by price per gallon for total cost. Cost per mile is total cost divided by distance. In metric mode the formula flips: fuel needed (liters) = distance (km) × fuel consumption (L/100km) / 100, then total cost = liters × price per liter. The conversion factor between the two systems is 235.215 -dividing it by MPG yields L/100km and vice versa. Results are rounded to two decimal places for currency and three for volume. All arithmetic runs in JavaScript in your browser.

About this tool

Estimate the fuel cost of any trip with this free gas cost calculator. Enter your distance, vehicle fuel efficiency (MPG or L/100km), and current fuel price to see total gallons or liters needed, total trip cost, and cost per mile or kilometer. The calculator supports both US customary (miles per gallon, dollars per gallon) and metric (liters per 100 km, price per liter) units with a one-click toggle. The US formula divides your trip distance by your vehicle's MPG rating to get gallons needed, then multiplies by the price per gallon. The metric formula multiplies distance in kilometers by L/100km and divides by 100 to get liters, then multiplies by the price per liter. The cost-per-mile (or per-kilometer) breakdown is useful for comparing vehicles: even a small difference in fuel efficiency compounds over thousands of miles into a meaningful annual cost difference. Keep in mind that real-world fuel efficiency is typically 10-15% worse than the EPA window sticker or manufacturer rating, especially in city driving, cold weather, or hilly terrain. Using your actual fill-up data rather than the official rating gives a more accurate estimate. Common uses include budgeting for road trips, comparing the fuel cost of two vehicles you are considering purchasing, calculating reimbursement amounts for work travel, estimating commuting costs when evaluating a job offer in a new city, and helping rideshare drivers figure out whether a long pickup is worth the fare. Results update in real time as you adjust inputs, so you can quickly model different fuel prices or route distances. All calculations happen in your browser with no sign-up required.

How to use Fuel Cost Calculator

  1. Enter distance. Type the total trip distance in miles or kilometers.
  2. Enter fuel efficiency. Type your vehicle's MPG or L/100km.
  3. Enter fuel price. Type the current price per gallon or liter.
  4. View cost. See total fuel needed, trip cost, and cost per mile.

Use cases

  • A family planning a cross-country road trip estimating total gas expenses to set a realistic travel budget before leaving.
  • A delivery driver comparing fuel costs between two vehicles to decide which one to use for a weekly route.
  • A college student calculating their monthly commute cost to compare driving versus buying a public transit pass.
  • A rideshare driver estimating per-trip fuel expenses to verify that fares cover gas costs after platform fees.

Frequently Asked Questions

Divide the trip distance by your vehicle's fuel efficiency (MPG) to get gallons needed, then multiply by the price per gallon. For example: 300 miles ÷ 25 MPG = 12 gallons × $3.50 = $42.00.

The average new car in the US gets about 25–30 MPG combined. Hybrids typically achieve 40–60 MPG. EVs don't use gallons but their MPGe (miles per gallon equivalent) often exceeds 100.

Divide 235.215 by the MPG value. For example, 25 MPG = 235.215 ÷ 25 = 9.4 L/100km. Lower L/100km means better fuel efficiency.

EPA tests use standardized conditions. Real-world factors like aggressive driving, cold weather, AC use, roof racks, and city driving typically reduce fuel economy by 10–15% compared to the sticker number.

Check fueleconomy.gov for official EPA ratings. For your actual MPG, fill your tank, note the odometer, drive normally, then divide miles driven by gallons at next fill-up.