Skip to content
ChalkCalculator

Auto

Fuel Cost Calculator

What a trip costs in gas — with the cost per mile, and an even split if you are sharing the drive.

Enter the distance, your fuel economy and the pump price.

Doubles the distance. Forgetting this is the usual way the answer comes out half right.

Optional. Splits the total evenly.

Estimate. A real-world figure based on the assumptions listed below, which you can change.

How this calculator works

Divide the distance by your miles per gallon to get the gallons, then multiply by the pump price. That is the whole calculation, and the interesting part is what it reveals about MPG.

Miles per gallon is a ratio with distance on top, which makes it behave strangely. Two figures cannot be averaged: a car doing 40 miles at 50 mpg and 40 at 10 mpg does not average 30 — it burns 4.8 gallons over 80 miles, which is 16.7 mpg.

The same quirk makes upgrades misleading. Going from 15 to 20 mpg saves more fuel over 10,000 miles than going from 30 to 50 does, even though the second sounds like a far bigger jump. Gallons per 100 miles is shown alongside MPG because it is the figure that moves in step with cost.

Round trip is a checkbox rather than something you do in your head, because forgetting to double the distance is the most common way this answer comes out half right.

The formula

Exactly what happens to your numbers, step by step.

  1. The cost

    gallons = distance ÷ mpg
    cost    = gallons × price per gallon
  2. The figure that tracks cost

    gallons per 100 miles = 100 ÷ mpg

    Unlike MPG, this scales linearly — double it and you double the fuel bill.

A worked example

A 420-mile drive each way at 28 mpg, with gas at $3.45 and four people in the car.

What you enter

Distance
420 miles each way
Fuel economy
28 mpg
Price
$3.45 a gallon
Sharing
4 people

The working

Round trip
840 miles
Gallons
840 ÷ 28 = 30
Total
30 × $3.45 = $103.50
Per mile
$0.12
Each
$25.88

$103.50 — about $26 each

Twelve cents a mile is the number worth remembering, because it makes other decisions easy: a 60-mile detour costs about $7, and that is usually a smaller consideration than people assume.

Assumptions

Every result here rests on these. Change your inputs and the result changes with them.

  • Fuel economy is constant for the whole trip.
  • The pump price does not change along the route.
  • The round trip covers the same distance both ways.

What this cannot tell you

  • Real fuel economy varies a great deal with how you drive. Highway cruising beats the sticker figure; city traffic, heavy loads, roof boxes and cold weather all fall well short of it.
  • It costs fuel only. Tolls, parking, wear and depreciation are real costs of driving and none of them are here.
  • The EPA rating on a window sticker is a laboratory figure. The economy shown on your own trip computer is usually the better input.
  • Electric vehicles do not work this way — cost per mile depends on electricity price and charging losses, which the EV Charging Cost Calculator handles.

Questions people ask

How much gas will a trip cost?

Divide the miles by your MPG to get gallons, then multiply by the price per gallon. A 300-mile drive at 30 mpg uses 10 gallons — about $35 at $3.50.

What MPG figure should I use?

The one from your own trip computer over a similar journey, if you have it. The EPA rating is a lab measurement and most drivers fall a little short of it, particularly in cold weather or heavy traffic.

Why can I not just average two MPG figures?

Because the distance is on top of the ratio. Forty miles at 50 mpg uses 0.8 gallons and forty at 10 mpg uses 4 — that is 4.8 gallons over 80 miles, or 16.7 mpg, not the 30 you would get by averaging.

Is a fuel economy upgrade worth it?

Look at gallons per 100 miles rather than MPG. Improving from 15 to 20 saves 1.7 gallons per 100 miles; going from 30 to 50 saves only 1.3. The small-sounding upgrade at the bottom is worth more.

Sources and review

The default figures here are typical published values, not fixed constants — densities, coverage rates and rules of thumb vary by product and by supplier. Every one of them is an input you can replace, and the figure on your supplier’s quote or the manufacturer’s data sheet beats any default. The assumptions and limitations above set out exactly what this rests on.

Methodology version 1.0.0 · Last reviewed