Fuel cost calculator

The fuel a trip needs and what it costs, in US or metric units.

Units
mi
MPG
$per gal

The calculator needs JavaScript to update, so the result shows the default example.

Trip fuel cost
—

Add a fuel price to see the cost.

Fuel needed
12.00 gal (45.42 L)
Trip distance
300 mi one way

Trip fuel cost: Add a fuel price to see the cost. Fuel needed 12.00 gal (45.42 L).

About this calculator

The formula, a worked example, where to find your numbers, and what is not included.

How it's calculated

Fuel needed = distance ÷ fuel economy in MPG, in gallons; or distance × fuel economy in L/100 km ÷ 100, in liters. Cost = fuel needed × the price per gallon or liter.

A round trip doubles the distance first. Cost per mile or km = cost ÷ total distance. Cost per person = cost ÷ people, rounded to the cent, so the shares may not add up exactly to the total. Fuel is also shown in the other unit: 1 US gallon = 3.785411784 liters, exactly.

Example: 300 miles at 25 MPG needs 300 ÷ 25 = 12.00 gallons (45.42 liters). At $3.00 a gallon, that costs 12 × $3.00 = $36.00. In metric, 500 km at 7.5 L/100 km needs 500 × 7.5 ÷ 100 = 37.50 liters, which costs 67.50 at 1.80 a liter.

Finding your numbers

Fuel economy: your vehicle's EPA rating at fueleconomy.gov, or your own average from the trip computer. Use the highway figure for long drives and the combined figure for mixed driving.

Fuel price: the pump price where you'll fill up. For a US average, see EIA's weekly Gasoline and Diesel Fuel Update. The calculator never fills in a price, because prices change every week.

Distance: the driving distance from a map app or odometer, not the straight-line distance.

What's not included

Real fuel economy changes with speed, load, air conditioning, idling, hills, weather and city traffic, so treat the result as an estimate. It covers fuel only: tolls, parking, maintenance and wear are not included.

Sources

Last reviewed December 3, 2026