Home › Converters › Fuel Cost Calculator

Fuel Cost Calculator

Work out the fuel cost of any trip with our free fuel cost calculator. Enter the distance, your car's miles per gallon, and the price per gallon, and it shows the gallons you will use, the total cost, and the cost per mile — so you can budget a road trip or compare two cars before you buy. Pick a fuel type — regular, mid-grade, premium, or diesel — for a typical price, or switch to kilometers, liters per 100 km, and price per liter.

Set to 2 for a round trip, or more for a regular commute.

Total cost: $35.00
300 miles at 30 mpg uses 10 gallons × $3.50 = $35.00  •  $0.12 per mile
Gallons used10 gal
Cost per mile$0.12
Distance (all trips)300 miles

How it works

Fuel cost comes down to three numbers: how far you are driving, how far your car goes on a gallon, and what a gallon costs. Distance is measured in miles, fuel economy is measured in miles per gallon (mpg), and the price is measured in dollars per gallon. Put the three together and the cost of the trip falls out in two steps.

First, divide the distance by the miles per gallon to find the gallons used. A 300-mile trip in a car that gets 30 mpg needs 300 ÷ 30 = 10 gallons. Second, multiply the gallons by the price per gallon to find the total cost. At $3.50 per gallon, 10 gallons × $3.50 = $35.00. The cost per mile is the total cost divided by the distance — $35.00 ÷ 300 miles = about $0.12 per mile — and it is the most useful of the three figures, because it lets you compare cars and trips of any length on equal terms.

Gallons used = distance ÷ mpg  |  Total cost = gallons × price per gallon  |  Cost per mile = total cost ÷ distance  |  1 gallon = 3.78541 liters  |  mpg = 235.215 ÷ liters per 100 km

The fuel-type box fills in a typical price for regular ($3.50 per gallon), mid-grade ($3.85), premium ($4.20), or diesel ($3.95) — typical prices you can edit to match the pump near you. Switch the units to kilometers, liters per 100 km, and dollars per liter and the same math runs in metric: 1 gallon is 3.78541 liters and 1 mile is 1.60934 km, so a car that uses 8 liters per 100 km gets about 29.4 miles per gallon.

Your car's real mpg is the number that matters most, and it is usually a little lower than the official rating. City driving with stop-and-go traffic, short trips in cold weather, a loaded roof rack, under-inflated tires, and fast highway speeds all push mpg down. The official combined rating is a good starting point, but the most accurate figure comes from measuring it yourself: fill the tank, reset the trip meter, drive normally, and at the next fill-up divide the miles driven by the gallons it takes to fill the tank again.

Fuel prices vary a lot by place and by season, so type in the price you actually see at the pump near you. The same 300-mile trip costs $35.00 at $3.50 a gallon, but $45.00 at $4.50 a gallon — a full $10 more for the same drive. If you set the number of trips to 2 for a round trip, or to 10 for a twice-a-week commute over five weeks, the calculator scales the distance, gallons, and total cost for you, while the cost per mile stays the same.

Common uses include budgeting a road trip, working out the monthly fuel cost of a commute, comparing two cars before buying — a 40-mpg car costs a third less in fuel per mile than a 30-mpg car at the same fuel price — and deciding whether driving beats flying or taking the train once fuel, tolls, and parking are counted.

Worked example

Rachel is driving 300 miles to visit her parents. Her car gets 30 miles per gallon, and fuel near her costs $3.50 per gallon. She wants to know what the trip will cost in fuel.

Step 1: Write down the distance — 300 miles.
Step 2: Divide by fuel economy to get gallons: 300 ÷ 30 = 10 gallons.
Step 3: Multiply by the price: 10 × $3.50 = $35.00.
Step 4: Divide the total by the distance for cost per mile: $35.00 ÷ 300 = $0.1167, about $0.12 per mile.

That is the exact result this calculator gives for a 300-mile trip at 30 mpg and $3.50 per gallon: 10 gallons used, $35.00 total, and about $0.12 per mile. For the round trip home, set the number of trips to 2 and the total doubles to $70.00 for 600 miles and 20 gallons, while the cost per mile stays at $0.12. If fuel rises to $4.00 a gallon before she leaves, the same one-way trip costs 10 × $4.00 = $40.00 instead.

FAQ

How much does it cost to drive 300 miles?

It depends on your car and the fuel price. At 30 miles per gallon and $3.50 per gallon, a 300-mile trip uses 10 gallons and costs $35.00, which is about $0.12 per mile.

How is fuel cost calculated?

Divide the distance by miles per gallon to get the gallons used, then multiply the gallons by the price per gallon. For example, 300 miles divided by 30 mpg is 10 gallons, and 10 gallons times $3.50 is $35.00.

What is cost per mile and why does it matter?

Cost per mile is the total fuel cost divided by the distance, so it shows what each mile of driving costs in fuel. At $35.00 for 300 miles, the cost per mile is about $0.12. It is the fairest way to compare cars, because it works for any trip length.

What fuel types and units can I use?

Regular, mid-grade, premium, and diesel, each with a typical price filled in for you — regular $3.50, mid-grade $3.85, premium $4.20, and diesel $3.95 per gallon — or type your own price. You can also switch distance to kilometers, fuel economy to liters per 100 km, and price to dollars per liter.

How can I find my car's real miles per gallon?

Fill the tank, reset the trip meter, and drive normally. At the next fill-up, divide the miles driven by the gallons it takes to fill the tank again. That figure is your real-world mpg, which is usually a little lower than the official rating.