Skip to content
DEVELOGCALC

Gas Cost Calculator

Estimate the fuel cost of a trip from distance, fuel economy, and gas price, with round-trip and cost-sharing options.

Try:
$

Result

Fuel cost: $52.50

Fuel cost

Fuel used (gal or L)
15
Cost per mile or km
$0.117
Distance driven
450
Calculation steps
  1. Distance = 450 mi
  2. Fuel = 450 ÷ 30 mpg = 15 gal
  3. Cost = 15 gal × $3.50 = $52.50

Calculations run in your browser. Your inputs are not sent to our server.

Formula

  • Gallons = Miles ÷ MPG
  • Cost = Gallons × Price per gallon
  • Metric: Liters = km × (L/100 km) ÷ 100
  • Cost per mile = Price ÷ MPG

How it works

Fuel used is the distance divided by miles per gallon (or, in metric, the distance times liters per 100 km divided by 100). Multiplying by the price gives the trip cost. Round trip doubles the distance before anything else is calculated.

The cost per mile is useful for comparing driving with other options or for reimbursing a shared ride: at $3.50 a gallon and 25 MPG, every mile costs 14 cents in fuel.

Worked examples

450-mile drive at 30 MPG

450 ÷ 30 = 15 gallons; 15 × $3.50 = $52.50.

Trip distance (one way)
450
Fuel economy (MPG or L/100 km)
30
Fuel price (per gallon or liter)
$3.50
Fuel cost
$52.50

Round trip split three ways

440 miles use 18.33 gallons, $71.32 in gas, or $23.77 each.

Trip distance (one way)
220
Fuel economy (MPG or L/100 km)
24
Fuel price (per gallon or liter)
$3.89
Round trip
Yes
Split the cost
Yes
People
3
Fuel cost
$71.32

Metric car

600 km at 6.5 L/100 km uses 39 liters, 72.15 in fuel cost; 6.5 L/100 km is about 36.2 MPG.

Units
Kilometers, L/100 km, price/liter
Trip distance (one way)
600
Fuel economy (MPG or L/100 km)
6.5
Fuel price (per gallon or liter)
$1.85
Fuel cost
$72.15

Get a realistic MPG

  • Real-world economy is often 10–25% below the window-sticker figure.
  • City driving, heavy loads, roof boxes, and speeds over 65 mph lower MPG.
  • Your trip computer or two fill-ups (miles driven ÷ gallons added) give the best number.

What this leaves out

Only fuel is included. Tolls, parking, and wear on the car are extra; the IRS business mileage rate, which covers all vehicle costs, is several times the fuel cost per mile for a typical car.

Last reviewed: