Gas Cost Calculator
Trip gas cost = (miles / MPG) x price per gallon. A 300 mile trip at 28 MPG with gas at $3.40 burns 10.71 gallons and costs $36.43, which is $0.12 per mile. Use your own measured MPG rather than the window sticker, and add about 10 to 20 percent for detours and price swings.
| Total fuel cost | |
| Gallons burned | |
| Cost per mile | |
| Each person pays (fuel only) | |
| With a 20 percent cushion |
Formula: miles / MPG x price per gallon. Enter total miles for a round trip, not one way. All calculations run in your browser, and nothing you type is uploaded or stored.
Enter your trip distance, your car MPG and the price of gas to see what the drive costs, gallon by gallon.
Key takeaways
- Cost = miles / MPG x price per gallon; 300 miles at 28 MPG and $3.40 is $36.43
- Cost per mile = cost / miles, about $0.12 in the example, the easiest number to reuse
- Real world MPG runs 10 to 25 percent below the window sticker, so measure your own tank to tank figure
- Round trips: enter total miles driven, then add about 10 percent for local driving
- A 20 percent price cushion of $7.29 on the example trip covers most pump price swings
On this page
The formula the calculator uses
Trip gas cost comes down to three numbers: how far you drive, how far your car goes on a gallon, and what a gallon costs where you fill up. The math is:
gallons = miles / MPG and cost = gallons x price per gallon. If you want the figure that is easier to compare across cars, divide again by miles to get cost per mile = cost / miles.
Take a 300 mile trip in a car that gets 28 MPG, with gas at $3.40 per gallon. Gallons burned: 300 / 28 = 10.71 gallons. Total cost: 10.71 x 3.40 = $36.43. Cost per mile: 36.43 / 300 = $0.12. That single number is the one worth remembering, because it works for any trip: at $0.12 per mile, a 40 mile round trip to the airport costs about 40 x 0.12 = $4.80 in fuel, and a 1,000 mile relocation drive costs about $120.
The calculator on this page runs exactly this chain, and adds one more step: splitting the total between the people riding along. Type the number of people and it shows what each person owes so the driver is not stuck covering all of it.
Why the same car can give you two different MPG numbers
The MPG on your window sticker is a lab number, and the EPA explains why it differs from real driving: the test cycles use gentle acceleration, mild temperatures and no cargo. Real world mileage usually lands 10 to 25 percent below the sticker, especially on short trips where the engine never warms up.
Cold starts matter more than distance. A two mile drive to the store can return less than half the highway MPG, because the engine runs rich while warming up and the trip ends before it reaches full efficiency. Highway driving at a steady 60 to 65 MPH is where most cars hit their best figure; push past 70 and aerodynamic drag starts to eat into it fast.
The practical move is to measure your own car instead of trusting the sticker. Fill the tank, reset the trip odometer, drive normally, then fill up again. MPG = miles driven / gallons it took to refill. If the sticker says 32 and your own test says 26, use 26 in the calculator. The trip estimate is only as honest as the MPG you feed it.
Where gas prices stand and how to check yours
The US Energy Information Administration publishes weekly gasoline prices for the nation, each region, and every state, updated every Monday. California and the West Coast usually run the highest in the country, while the Gulf Coast states sit at the bottom, so the same road trip can cost noticeably different amounts depending on which states you cross.
For a trip budget, use the price you expect to pay along the route, not your hometown price. A drive from a cheap-gas state into a high-price one should be budgeted at the higher number. GasBuddy and similar apps show station level prices if you want to plan fuel stops, but for a rough budget the state average from EIA is close enough.
Price swings are normal. A gallon can move 30 or 40 cents within a month around holidays and refinery season. If your budget is tight, pad it: a 20 percent cushion on the fuel line absorbs most price moves. On the $36.43 example trip, that cushion is about 36.43 x 0.20 = $7.29, so plan roughly $43.72 for fuel.
Round trips, detours and the buffer people forget
The most common budgeting mistake is entering one way miles for a trip you drive twice. The calculator takes whatever distance you type, so enter the full distance you will cover. A 120 mile one way visit to family is 240 miles of driving, which at 28 MPG and $3.40 is 240 / 28 x 3.40 = $29.14, not half that.
Then add the extras: a wrong exit, a lunch stop off the highway, a loop for cheap gas itself. Ten miles here and fifteen there add up. A simple habit is to add 10 percent to the map distance for local driving at the destination. On a 500 mile round trip, that is 500 x 0.10 = 50 extra miles, about 50 / 28 x 3.40 = $6.07.
City driving at the destination changes the math too. A trip that is 400 highway miles plus 40 miles of stop and go around town will burn more than the flat MPG number suggests, because the city miles run at a worse figure. If you want to be precise, split it: estimate the highway miles at your highway MPG and the city miles at your city MPG, then add the two costs. For most people, entering a slightly worse blended MPG is close enough.
What common trips cost at the pump
The table below prices typical drives at 28 MPG and $3.40 per gallon, a middle of the road car at a middle of the road price. Scale linearly: a car that gets 22 MPG costs about 28 / 22 = 1.27 times these figures, a 40 MPG hybrid costs about 0.70 times them.
| Trip | Miles | Gallons | One way cost | Round trip cost |
|---|---|---|---|---|
| Across town and back | 20 | 0.71 | $2.43 | $4.86 |
| Weekend trip, one way | 150 | 5.36 | $18.21 | $36.43 |
| Half state drive | 250 | 8.93 | $30.36 | $60.71 |
| Interstate city hop | 500 | 17.86 | $60.71 | $121.43 |
| Cross country leg | 1000 | 35.71 | $121.43 | $242.86 |
Reading the table: the weekend trip line is the same $36.43 from the worked example, because 300 total round trip miles at 28 MPG is 10.71 gallons. The cross country leg shows why fuel stops matter on long drives: at 35.71 gallons you will fill up four or five times, so the cost arrives in installments of about $60 each rather than one hit.
Splitting gas money fairly between passengers
Once you have the fuel total, splitting is a judgment call, and there are three common conventions. Fuel only: divide the pump cost by everyone in the car, so four people on the $36.43 trip each pay 36.43 / 4 = $9.11. Fuel plus wear: add a few cents per mile for tires, oil and depreciation, since the IRS standard mileage rate exists partly to capture those costs; many groups round up to something like $0.15 per mile per person. Everything: the driver eats none of it, passengers split gas, tolls and parking together.
Whichever you pick, say it before the trip, not at the pump. The driver pays nothing argument usually holds when the driver is also doing all the work, but on a long haul with four passengers, covering the whole fuel bill gets expensive fast. The calculator's passenger split handles the fuel only case in one step.
One more note for trips with mixed costs: gas is usually the smallest line. Tolls, a hotel and a meal can each exceed the fuel cost for the day. Budget the trip as a whole, use this tool for the fuel line specifically, and keep the split simple by collecting one flat amount per person at the start.
Frequently asked questions
How do I calculate gas cost for a trip?
Divide trip miles by your car MPG to get gallons, then multiply by the price per gallon. For 300 miles at 28 MPG and $3.40: 300 / 28 = 10.71 gallons, then 10.71 x 3.40 = $36.43.
How much gas money for a 500 mile trip?
At 28 MPG and $3.40 per gallon, 500 / 28 = 17.86 gallons, which costs 17.86 x 3.40 = $60.71. A 30 MPG car would spend 500 / 30 x 3.40 = $56.67 instead.
How much is gas per mile?
Cost per mile = price per gallon / MPG. At $3.40 and 28 MPG that is 3.40 / 28 = $0.12 per mile. At $4.00 and 25 MPG it is 4.00 / 25 = $0.16 per mile.
Should I use the MPG on my window sticker?
Use a measured number instead. Real driving typically returns 10 to 25 percent less than the EPA figure. Track one tank to tank fill: miles driven divided by gallons refilled gives your true MPG.
How do I split gas money with friends?
Divide the total fuel cost by the number of people including the driver. A $36.43 trip with 4 people in the car means each pays 36.43 / 4 = $9.11.
How much does idling cost?
A car idling uses roughly 0.2 to 0.5 gallon per hour depending on engine size. One hour of idling at $3.40 costs about 0.3 x 3.40 = $1.02 and adds zero miles to the odometer.
Is it cheaper to drive or fly?
Compare fuel per person. One driver at $0.12 per mile over 900 miles spends $108, which beats most solo flights, but four passengers flying might beat four separate car costs once you add hotel nights and time.
How does speed affect gas cost?
Gas mileage usually drops fast above 60 MPH. Driving 75 instead of 65 can cut MPG by 15 percent or more, which raises the cost of the same trip by roughly 15 percent, about 36.43 x 0.15 = $5.46 on the example.
How do I budget gas for a month of commuting?
Multiply daily round trip miles by commuting days, then apply the same formula. 30 miles a day, 22 workdays, 28 MPG at $3.40: 30 x 22 = 660 miles, 660 / 28 x 3.40 = $80.14 for the month.
Why did my calculated cost not match the pump total?
Small differences come from a rounded MPG, a tank that was not full at the start, or a price that changed between states on the route. Within 5 percent is normal; a bigger gap means your MPG input is off.
Does AC use more gas than open windows?
At highway speed, yes, the AC compressor draws engine power and costs a few percent in MPG. At low speed the effect is small either way. Neither changes a trip budget by more than a dollar or two on typical drives.
Spotted a wrong number or a broken result?
More Automotive tools
- 20/4/10 Rule Calculator
- BMW Monthly Payment Calculator
- Brake Pad Life Calculator
- CC to HP Calculator
- Capitalized Cost Calculator
- Car Affordability Calculator
- Car Depreciation Calculator
- Car Insurance Cost Estimator
- Car Lease vs Buy Calculator
- Car Payment Calculator
- Compression Height Calculator
- Cost Per Mile to Drive Calculator
- Cost To Drive Calculator
- EV Charging Cost Calculator
- EV vs Gas Cost Calculator
- Electric Vehicle Charging Cost Calculator
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.