Fuel Cost Calculator
This fuel cost calculator turns a trip into a dollar figure. Enter the distance, your vehicle's MPG, and the price of gas, and you'll see the total fuel cost, the gallons you'll burn, and the cost per mile. Flip on round trip for there-and-back, or split the bill between riders for a fair carpool number. It's free, private, and a quick way to budget any drive before you go.
- Total cost
- Gallons used
- Cost per mile
- Round trip
- Split the bill
Last updated July 25, 2026 Miles, MPG, and US dollars Published by Muhammad Younus, Calcowa
Enter a distance, an MPG above zero, and a gas price.
Figures use US miles, MPG, and dollars per gallon. Gas prices change often, so use the price you'll pay at the pump.
How do you calculate fuel cost?
Fuel cost comes down to three numbers: how far you're going, how many miles your car gets per gallon, and what a gallon costs. First you divide the distance by the MPG, which tells you the gallons the trip needs. Not sure what your car gets? The Gas Mileage Calculator measures your real MPG from a tank of driving. Then you multiply those gallons by the price per gallon to get the total. This calculator runs both steps for you, and it adds the cost per mile so you can compare drives, plus a round-trip option and a split so a carpool settles up fairly. Everything updates the moment you change a number, and it all stays in your browser.
Budgeting a drive, step by step
Here's the quick routine for any trip you're planning:
- 1
Enter the distanceType how far you're driving, one way, in miles.
- 2
Add MPG and pricePut in your fuel economy and what you'll pay per gallon.
- 3
Set the extrasTurn on round trip and set how many people are splitting it.
- 4
Read the resultYou'll see total cost, gallons, per mile, and each share.
Sample trip costs
These one-way examples assume gas at $3.50 a gallon, to show how distance and MPG move the total.
| Distance | MPG | Gallons | Cost |
|---|---|---|---|
| 100 mi | 25 | 4.0 | $14.00 |
| 300 mi | 25 | 12.0 | $42.00 |
| 300 mi | 18 | 16.7 | $58.33 |
| 500 mi | 30 | 16.7 | $58.33 |
| 1,000 mi | 22 | 45.5 | $159.09 |
How far will $20, $40, or $60 of gas take you?
Sometimes you've got a set amount to spend and want the miles, not the cost. Flip the math around: divide your budget by the gas price to get gallons, then multiply by your MPG for the distance. These distances assume a 25 MPG car at that same $3.50 pump price, so change either number in the tool above to match your own car.
| Gas budget | Gallons | Distance (25 MPG) |
|---|---|---|
| $20 | 5.7 | 143 mi |
| $40 | 11.4 | 286 mi |
| $60 | 17.1 | 429 mi |
| $80 | 22.9 | 571 mi |
| $100 | 28.6 | 714 mi |
Ways to lower your fuel cost
The two levers you control are how far you drive and how many miles you squeeze from each gallon. A few habits move the second one:
-
Ease off the gas. Steady cruising sips less fuel than hard acceleration and stop-and-go, so smooth out your speed where you can.
-
Keep tires inflated. Under-inflated tires drag, so check them against the pressure on your door jamb and top them up.
-
Skip the idling. A parked engine still burns fuel, so switch off if you'll be sitting for more than a minute.
-
Drop the extra weight. Clear out the trunk and pull the roof box when you don't need it, since both make the engine work harder.
-
Batch your errands. One planned loop beats several cold starts, so group trips and the engine spends less time warming up.
-
Keep up maintenance. A clean air filter and fresh oil help the engine run at its rated MPG, which is the number this calculator counts on.
Frequently asked questions
You enter the trip distance, your vehicle's MPG, and the price of a gallon of gas, and it works out the total fuel cost. Behind the scenes it divides the distance by your MPG to get the gallons you'll burn, then multiplies that by the price. It also shows your cost per mile and, if you turn on round trip, it doubles the distance so you don't have to.
If you don't know it offhand, your car's trip computer usually shows it, or you can work it out: fill the tank, drive, refill, then divide the miles driven by the gallons it took. City driving runs lower and highway runs higher, so an average is fine for planning. Most sedans land near 30 MPG, SUVs nearer 22, and trucks lower, so use one of those if you're just estimating.
Yes. Set the number of people sharing the ride and the calculator divides the total fuel cost evenly, so each person's share shows right away. That's handy for a road trip or a carpool, where you'll want a fair number to settle up. The split uses the round-trip total when round trip is on, so nobody's left short on the way home.
It does. Flip on the round-trip switch and the tool doubles your one-way distance before it figures gallons and cost, so the number you see covers there and back. Leave it off for a one-way drive, like a move or a drop-off. Either way the gallons, total, and per-mile figures all line up with the distance the calculator is actually using.
Use the price you'll actually pay at the pump, since it swings by region and by week. If you're planning ahead, a recent local average works well, and you can nudge it up a little to stay safe. The calculator treats the price as dollars per gallon, so for a quick what-if you can try a higher and a lower price to see the range your trip might cost.
Yes on both counts. There's no sign-up and no limit, and every number is worked out in your browser, so nothing you type is sent anywhere. Bookmark it for the next road trip, commute estimate, or carpool, and you'll have your fuel cost, gallons, and per-mile figure in a second. It's a quick way to budget any drive before you set off.
For a 300 mile trip in a car that gets 25 MPG with gas at $3.50 a gallon, you'll burn 12 gallons and spend about $42. Change any of the three numbers above and the total updates at once, so you can plug in your own distance, your car's MPG, and today's pump price to get a figure that fits your drive.
Take a 30 mile round-trip commute in a 25 MPG car: that's 1.2 gallons a day, so at $3.50 a gallon you're spending about $4.20 daily. Drive it 22 workdays and it adds up to roughly $92 a month in gas. Enter your own round-trip miles, MPG, and pump price above, turn on round trip, and the tool sizes up your commute in a second.
Related tools
More finance and money tools.
Loans, pay, and everyday money.
Auto Loan CalculatorCar payment with tax and trade-in.
Tip CalculatorTip, total, and split the bill.
Planning a drive?
Work it out above, or browse all the finance tools.