Fuel Cost Calculator

miles
25 mpg
$/gal
Total Cost$42.00
Gallons Needed12.00

This fuel cost calculator estimates what a trip will cost in gas by combining the distance you plan to drive, your vehicle fuel economy in miles per gallon, and the price you pay per gallon. It first works out how many gallons the journey will burn, then multiplies that by the pump price to give a dollar figure. Use it to budget a road trip, compare routes, or see how a more efficient vehicle changes your running costs.

Formula

Cost = (Distance ÷ MPG) × Price per gallon

Distance
Trip distance in miles
MPG
Vehicle fuel economy in miles per gallon (must be positive)
Price per gallon
Cost of one gallon of fuel in dollars
Cost
Estimated total fuel cost for the trip

How it works

  1. Enter the trip distance in miles, your vehicle fuel economy in miles per gallon (MPG), and the current price per gallon of fuel.
  2. The calculator divides distance by MPG to find the gallons the trip requires, then multiplies that by the price per gallon.
  3. Read the total trip cost and the gallons needed in the result cards; both are rounded to two decimal places.

Worked example

A 300-mile drive in a car that gets 30 MPG with gas priced at $3.50 per gallon.

  1. Gallons needed: 300 ÷ 30 = 10 gallons.
  2. Total cost: 10 × $3.50 = $35.00.

The trip needs 10 gallons and costs about $35.00 in fuel.

Frequently asked questions

What MPG number should I enter?
Use your real-world fuel economy rather than the sticker rating if you can. Highway driving usually beats the combined figure while city stop-and-go traffic falls below it, so a recent fill-up average gives the most accurate trip cost.
Does this calculator handle round trips?
It uses whatever distance you type, so for a round trip enter the total there-and-back mileage. If you only know the one-way distance, double it before entering it to capture the return leg.
How is this different from a gas mileage calculator?
This tool starts from a known MPG and price to estimate the dollar cost of a trip. A gas mileage calculator works the other way, deriving your MPG from the miles you actually drove and the gallons you actually burned.
Can I use it for diesel or electric vehicles?
It works for any liquid fuel measured per gallon, including diesel, as long as you enter the matching price and economy. It is not designed for electric vehicles, which are billed per kilowatt-hour rather than per gallon.