Fuel Cost Calculator

Enter a distance, your MPG and a gas price, and this works out the gallons and the dollars, with a round-trip option and a split for everyone in the car. Leave the price blank and it uses today's AAA national average. There is a second mode for what your regular weekly driving costs by the month and the year.

One way. Use the round-trip switch below for there and back.
Blank uses 27, the EPA's real-world fleet average. Your dash display is better.
Blank uses the AAA national average for your fuel. Your local sign is better.

The formula

Gallons = distance ÷ MPG     Cost = gallons × price per gallon

That is the entire calculation, and it is worth seeing plainly because it tells you what actually moves the answer. Doubling the distance doubles the cost. A better price helps in proportion. But MPG sits in the denominator, which means going from 18 to 27 MPG cuts the bill by a third, and that is a bigger lever than any gas station price war. The two numbers people guess worst are their own: real MPG runs below the window sticker for most drivers, and most of us do not know the local price within twenty cents. Use the MPG your car's own display reports and the price on the sign you actually drive past, and this estimate gets very good.

Worked example

A 500 mile trip in a 27 MPG car with regular at $4.15 a gallon:

500 ÷ 27 = 18.52 gallons, and 18.52 × $4.15 = $76.85. Make it a round trip and it is 37.04 gallons and $153.70. Four people splitting the round trip pay $38.43 each, which is the arithmetic that makes road trips cheaper than almost any other way four people can travel 500 miles.

Gas is the fifth of the cost you can see

At current averages, gas works out to about 15 cents a mile. The full cost of running a car, once depreciation, insurance, maintenance and tires are counted, is around 70 to 80 cents a mile by AAA's annual reckoning. So the number at the pump is roughly a fifth of what the trip actually consumes; the rest leaves your wallet invisibly, through the car's falling value and the insurance bill that arrives whether you drive or not.

Which number should you use? For a trip you were going to take in a car you already own, the gas figure on this page is the honest marginal cost: the other costs happen anyway. For deciding whether to drive at all, whether to keep a second car, or what a commute really costs, the full figure is the truthful one, and our commute cost calculator and mileage reimbursement calculator work on that basis. Most fuel calculators never mention the distinction, which is how a 15 cent mile gets mistaken for the whole story.

How far does $40 of gas go?

At about $4.15 a gallon, $40 buys roughly 9.6 gallons. At 27 MPG that is about 260 miles; at 18 MPG it is about 173; at 40 MPG in a good hybrid it is about 386. Same forty dollars, more than a two-to-one spread in how far it takes you, which is the MPG lever seen from the other end.

Premium, diesel, and what the spread costs

As of September 2026 the national averages run about $4.15 regular, $5.03 premium and $5.90 diesel. Premium is about 21 percent over regular, and the rule is simple: pay it if your owner's manual says required, skip it if the manual says nothing, and make your own call on recommended, where the car runs fine on regular with a little less performance. On the 500 mile example, premium adds $16.30 to the tank. Diesel is the surprise at today's prices: at $5.90 against $4.15, a diesel needs about 38 MPG just to match a 27 MPG gas car on cost per mile. Many diesel cars clear that bar comfortably; a diesel pickup towing a trailer does not, which is why the fuel field above lets you price your actual fuel rather than assuming diesel always wins.

What quietly changes your MPG on a real trip

The EPA's testing says fuel economy falls off quickly above about 50 mph; driving 75 instead of 65 costs a typical car something like 12 to 15 percent, which on a long trip is like paying fifty cents a gallon more. A loaded roof box can cost up to a quarter of your highway economy, which is worse than almost anything you could put inside the car. Air conditioning costs a few percent, and much less than open windows at highway speed. None of this needs to change your plans; it just means the honest MPG for a fast, loaded trip is a few ticks below what your car returns on a gentle week, and you can enter that number here.

Doing the same trip on electricity

The same 500 miles in an EV charged at home costs roughly $26 at average residential rates, about a third of the gas figure, though public fast charging on a road trip narrows that gap considerably. Our EV savings calculator compares the two honestly in both directions, and the road trip calculator plans the stops, meals and drive time around the fuel arithmetic this page does.

Data reviewed: September 2026. Figures here come from published sources and change over time. How we verify

Put this calculator on your website for free

Copy one snippet and give your visitors a working Fuel Cost Calculator.

Frequently asked questions

How do I calculate the gas cost for a trip?

Divide the distance by your car's miles per gallon to get gallons, then multiply by the price per gallon. A 500 mile trip in a 27 MPG car needs about 18.5 gallons, which is about $77 at a $4.15 pump price. That is the whole formula; everything else on this page is about putting honest numbers into it.

How much gas does a 500 mile trip take?

At the EPA's real-world average of 27 MPG, about 18.5 gallons, costing roughly $77 at the current national average price. A big SUV at 18 MPG needs nearly 28 gallons for the same trip, about $115, which is why the MPG field moves this answer more than the price field does.

How far does $40 of gas go?

At the September 2026 national average of about $4.15 a gallon, $40 buys roughly 9.6 gallons. In a 27 MPG car that is about 260 miles; in an 18 MPG truck it is about 173. Your tank gauge measures gallons, but your wallet measures miles, and MPG is the exchange rate between them.

Should I use premium gas for the trip?

Only if your owner's manual requires it. Premium currently runs about 88 cents a gallon over regular, roughly 21 percent more, and an engine designed for regular gains nothing from it. If the manual says premium is recommended rather than required, the car will run safely on regular with slightly reduced performance, and this calculator can price both so you can see the actual difference for your trip.

Why is my real MPG lower than the window sticker?

The EPA label is measured on a standardized test, and real traffic, real speeds and real cargo usually land below it. Highway speed is the big one: fuel economy drops quickly above about 50 mph, so a trip driven at 75 uses noticeably more gas than the same trip at 65. A loaded roof box can cost up to a quarter of your highway MPG by itself. When in doubt, use the MPG your own car actually shows you, not the brochure number.

Can Google Maps calculate my gas cost?

Maps shows a fuel estimate on some routes, based on its guess about your vehicle. This page does the same arithmetic with your actual MPG and your actual pump price, which is worth doing when the trip is long enough for the answer to matter. Get the distance from any map you like and bring it here.

How much do I spend on gas in a year?

Switch to the regular-driving mode and give it your miles in a typical week. At 250 miles a week and 27 MPG, gas runs about $38 a week, about $167 a month, and about $2,000 a year at current prices. The same mode shows what one more MPG is worth over a year, which is the honest way to think about whether a more efficient car pays.

Is gas the whole cost of driving?

No, and this is the most useful thing this page can tell you. Gas at current averages is about 15 cents a mile, while the full cost of running a car, counting depreciation, insurance and maintenance, is around 70 to 80 cents a mile. Gas is the fifth of the cost you see at a pump, which is why a cheap-to-fill car is not automatically a cheap car. For decisions bigger than one trip, our commute cost calculator does that arithmetic properly.

Related calculators