Fuel cost calculator for trips and commutes
Enter the distance, your car's miles per gallon and the price of fuel. A 300-mile trip at 30 mpg uses 10 gallons; at $3.50 a gallon it costs $35, or $70 for the round trip.
Inputs used by this calculator
Fuel Cost Calculator uses the fields below. The starting values reproduce the page example; replace them with values from the same units and time period before using the result.
| Input | Starting example | Accepted value | How it is used |
|---|---|---|---|
| Trip distance (miles) | 300 | 0 or greater | Supplies the trip distance (miles) quantity used by the published equation or result breakdown. |
| Fuel economy (miles per gallon) | 30 | 0 or greater | Supplies the fuel economy (miles per gallon) quantity used by the published equation or result breakdown. |
| Fuel price per gallon | 3.5 | 0 or greater | Supplies the fuel price per gallon quantity used by the published equation or result breakdown. |
| Trip | One way | One way · Round trip (double the distance) | Supplies the trip quantity used by the published equation or result breakdown. |
| People sharing the cost | 1 | 1 to 100 | Supplies the people sharing the cost quantity used by the published equation or result breakdown. |
How trip fuel cost is calculated
Divide the distance by the fuel economy to get gallons, then multiply by the price per gallon. Choose round trip to double the distance, and add passengers to split the cost.
gallons = miles ÷ mpgcost = gallons × price per gallonFinding your car's mpg
FuelEconomy.gov lists EPA ratings for most cars sold in the United States, with city, highway and combined values. Your real mileage depends on speed, traffic, weather, tire pressure and load, so a figure from your own fill-ups is often more accurate.
Measuring real mpg at the pump
Fill the tank and reset the trip odometer. At the next fill-up, divide the miles driven by the gallons added. Repeating this for a few tanks gives a reliable average.
Checking fuel prices
The U.S. Energy Information Administration publishes weekly average gasoline and diesel prices by region. Local prices vary, so use the price where you expect to buy fuel.
Cost per mile and per 100 miles
Cost per mile is the price per gallon divided by mpg. It makes it easy to compare cars or estimate a monthly commute: at $3.50 a gallon, a 25 mpg car costs 14 cents a mile, while a 40 mpg car costs under 9 cents.
What the estimate leaves out
Tolls, parking, wear and tear, and insurance are not included, and electric vehicles need the EV Charging Cost Calculator instead. For mileage reimbursement, see the Mileage Calculator.
Fuel and cost by fuel economy
| Fuel economy | Gallons per 100 mi | Cost per 100 mi | Cost per 1,000 mi |
|---|---|---|---|
| 15 mpg | 6.67 | $23.33 | $233 |
| 20 mpg | 5.00 | $17.50 | $175 |
| 25 mpg | 4.00 | $14.00 | $140 |
| 30 mpg | 3.33 | $11.67 | $117 |
| 35 mpg | 2.86 | $10.00 | $100 |
| 40 mpg | 2.50 | $8.75 | $88 |
| 50 mpg | 2.00 | $7.00 | $70 |
Frequently asked questions
How do I calculate gas cost for a trip?
Divide miles by mpg, then multiply by the price per gallon.
How much does a 300-mile trip cost?
At 30 mpg and $3.50 a gallon, $35 one way.
Where can I find my car's mpg?
FuelEconomy.gov lists EPA ratings; your own fill-ups give real-world mileage.
How do I split gas money?
Enter the number of people; the result shows the cost per person.
How do I find cost per mile?
Divide the price per gallon by mpg.
Does this include tolls?
No. Add tolls and parking separately.
Can I use it for an electric car?
Use the EV Charging Cost Calculator for electricity.
What to keep in mind
Traffic, weather, load and detours can change real consumption.
Results are rounded for display in US format, with money in dollars and cents; CSV exports keep full calculation precision. This is a calculation summary, not an official certificate.