Gas Cost for Trip Calculator
Estimating the fuel cost of a drive comes down to two steps: how many gallons the trip burns and what each gallon costs. This calculator divides the trip distance by your vehicle's fuel economy in miles per gallon to find the gallons needed, then multiplies by the price per gallon to give the total fuel cost. It shows the gallons in between so you can see where the number comes from. Enter your own distance, miles per gallon and fuel price to budget a road trip, split fuel costs with passengers, or compare two routes. For accuracy, use the fuel economy that matches the journey: the highway rating for long interstate runs, the city rating for stop-and-go driving, or better still your own observed miles per gallon. For a there-and-back journey, enter the round-trip distance, twice the one-way figure. Because fuel cost is directly proportional to the pump price, and prices vary by region and over time, the price per gallon is left as an editable input you can set to today's local figure. Every figure here is computed deterministically from the standard fuel-cost formula, shown in full below, with a worked example that reconciles exactly to the calculator so you can follow each step.
Fuel cost is the gallons used times the price per gallon: cost = (distance / MPG) x price. A 300 mile trip at 30 MPG needs 10 gallons, which at $3.50 a gallon costs $35.00.
Fuel cost formula
Fuel cost = (distance / MPG) x price
distance = trip distance (miles)
MPG = fuel economy (miles per gallon)
price = price per gallon ($)
Gallons needed = distance / MPG
Dividing distance by miles per gallon gives the gallons consumed; multiplying by the price per gallon gives the total fuel cost.
Worked example
A 300 mile trip in a vehicle doing 30 miles per gallon, fuel at 3.50 dollars a gallon.
- Gallons needed = 300 / 30 = 10
- Multiply by price: 10 x 3.50 = 35
- Total fuel cost = $35.00
The trip costs 35.00 dollars in fuel. These are the calculator's default inputs, so the result above matches the widget exactly.
Fuel cost for a 300 mile trip at 3.50 dollars per gallon
Better fuel economy lowers the gallons used and the cost.
| MPG | Gallons | Fuel cost |
|---|---|---|
| 20 | 15.00 | $52.50 |
| 25 | 12.00 | $42.00 |
| 30 | 10.00 | $35.00 |
| 40 | 7.50 | $26.25 |
Measurement units and conversion references: US National Institute of Standards and Technology (NIST).
Gas cost for trip calculator: frequently asked questions
How do I work out the gas cost of a trip?
Divide the trip distance by the vehicle's fuel economy in miles per gallon to get the gallons needed, then multiply by the price per gallon. A 300 mile trip at 30 miles per gallon needs 10 gallons, which at 3.50 dollars a gallon costs 35 dollars.
Where do I find my MPG?
Use the combined fuel economy figure for your vehicle, available from the manufacturer or from the official US fuel economy ratings. For a more accurate trip estimate, use your own observed miles per gallon, which depends on driving style, load and conditions.
Should I use highway or city MPG?
Use the figure that matches the trip. A long interstate drive is closer to the highway rating, while stop-and-go city driving uses more fuel and is closer to the city rating. A mixed trip sits near the combined figure.
Does this include a round trip?
Only if you enter the round-trip distance. The calculator uses whatever distance you give it, so for a there-and-back journey, enter twice the one-way distance, or add the legs together.
Why does fuel price change the answer so much?
Fuel cost is directly proportional to the price per gallon, so a swing in pump prices moves the trip cost by the same proportion. Because prices vary by region and over time, the price is left as an editable input you can set to today's local figure.
Official sources
- Measurement units and conversion references: US National Institute of Standards and Technology (NIST). As at 25 June 2026.
Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.