The basic formula for gasoline cost

To find out how much a trip will cost in gas, divide the distance you'll drive by your car's fuel efficiency, then multiply by the current price per gallon. The formula is: (distance ÷ miles per gallon) × price per gallon = total cost.

For example, if you're driving 300 miles, your car gets 25 miles per gallon, and gas costs $3.50 per gallon, the math is: (300 ÷ 25) × $3.50 = 12 gallons × $3.50 = $42. That's your gasoline cost for the trip.

The trickiest part for most people is knowing your car's actual fuel efficiency. The EPA rating on the window sticker is a starting point, but real-world driving often differs. Highway driving typically uses less gas than city driving, and factors like traffic, weather, and how you accelerate all shift the number.

Key Takeaways

  • Divide your total distance by your car's miles per gallon, then multiply by the current gas price to find trip cost.
  • Your car's actual fuel efficiency depends on driving conditions — highway trips use less gas per mile than city driving.
  • Check your car's fuel economy rating in the owner's manual or on fueleconomy.gov, or calculate it yourself by tracking fill-ups over time.
  • Gas prices vary by location and change daily, so use the price at the station where you'll fill up, not a national average.
  • Round up your estimate by 10 to 15 percent to account for idling, detours, and real-world driving patterns.

Finding your car's actual miles per gallon

The EPA rating printed on new cars is useful but not exact for your driving. To find your real fuel economy, fill your tank completely, drive normally for at least 100 miles, then fill up again and note how many gallons it took. Divide the miles driven by the gallons used. Do this a few times across different types of driving — highway, city, mixed — to see the range.

If you drive a newer car, your dashboard may display fuel economy in real time or show an average over recent trips. This number is often more accurate than the EPA rating for your specific habits. Check your owner's manual for how to access it.

For used cars or if you don't want to track fill-ups yourself, the EPA's fueleconomy.gov website has ratings for most vehicles back to 1984. Search by year, make, and model. The site shows separate numbers for city, highway, and combined driving, which helps you pick the right one for your trip type.

Using current gas prices in your calculation

Gas prices change daily and vary by location — sometimes by 50 cents or more between neighboring towns. Using a national average or last week's price will throw off your estimate. Check the actual price at the station where you plan to fill up, or use GasBuddy or AAA's fuel price tracker to see what stations near your route are charging.

If you're planning a long trip across multiple states, prices will differ along the way. For a rough estimate, use the average of prices in the states you'll pass through. For a more precise budget, map your route and check prices at stations along it, then add a small buffer in case prices have risen by the time you travel.

Adjusting your estimate for real-world driving

Highway driving is more efficient than city driving because you spend less time accelerating and idling. If your car is rated at 25 mpg combined, it might get 22 mpg in the city but 28 on the highway. A trip that's mostly highway will cost less per mile than one with heavy traffic and frequent stops.

Other factors that lower fuel economy include cold weather (engines run less efficiently when cold), carrying heavy cargo, towing, and aggressive acceleration. If your trip involves any of these, reduce your estimated mpg by 10 to 15 percent. If you're driving mostly on flat, open highway in good weather, you might beat your estimate.

A practical approach: calculate your cost using your car's real-world mpg, then add 10 to 15 percent as a buffer. This accounts for detours, traffic delays, and the fact that most people drive less efficiently than the EPA test conditions assume.

Calculating fuel cost for a monthly or yearly budget

To estimate how much you'll spend on gas over a month or year, start with your average monthly mileage. If you commute 20 miles each way, five days a week, that's roughly 400 miles per month just for commuting. Add other regular trips — groceries, errands, social outings — to get a realistic total.

Multiply your monthly miles by the current gas price per gallon, then divide by your car's mpg. For example, 1,200 monthly miles ÷ 25 mpg × $3.50 per gallon = $168 per month. Multiply by 12 for a yearly estimate: $168 × 12 = $2,016 per year.

Keep in mind that gas prices fluctuate seasonally — they're often higher in summer and lower in winter — so a yearly average based on today's price may be high or low. Track your actual spending over a few months to build a more accurate picture of what you'll spend.

Tools and shortcuts for quick calculations

If you don't want to do the math by hand, several free tools can do it for you. GasBuddy has a trip cost calculator where you enter your starting point, destination, and vehicle type, and it estimates fuel cost based on current prices and EPA ratings. Fuelly is a fuel-tracking app that calculates your real mpg over time and can estimate trip costs.

Your phone's calculator app works fine too. The formula is straightforward enough that most people can do it in under a minute once they know their mpg and the gas price. Write down your car's mpg rating somewhere you can find it — your insurance card, phone notes, or the owner's manual — so you don't have to look it up every time.

Common mistakes that throw off your estimate

The most common error is using the EPA's "combined" rating when your trip is mostly highway, or vice versa. If you're driving 400 miles on the interstate, use the highway rating, not the combined one. The difference can be 3 to 5 mpg, which adds up over a long distance.

Another mistake is forgetting to account for detours or traffic. If your GPS says 300 miles but you know you'll hit rush hour or take a scenic route, add 10 to 20 miles to your estimate. Similarly, if you're towing a trailer or carrying a full load, your fuel economy will drop noticeably — don't use your normal mpg.

Finally, some people use yesterday's gas price when prices have jumped overnight. Gas prices can move 20 to 30 cents in a day, especially around holidays or when crude oil prices shift. Check the price the morning of your trip or the day before, not a week earlier.

Frequently Asked Questions

Does my car's fuel economy get worse as it ages?

Yes, gradually. A well-maintained car loses about 1 to 2 percent fuel efficiency per year as the engine wears. A car that got 25 mpg new might get 23 mpg at 100,000 miles. Regular maintenance — oil changes, air filter replacement, proper tire pressure — slows this decline. If your mpg drops suddenly by more than 2 to 3 mpg, have your mechanic check for problems like a clogged fuel filter or worn spark plugs.

How do I know if I should use city or highway mpg for my trip?

If your trip is more than 75 percent highway driving, use the highway rating. If it's more than 75 percent city or mixed driving with frequent stops, use the city rating. For trips that are roughly split between the two, use the combined rating. When in doubt, use the combined rating — it's designed for typical driving patterns.

Should I include the cost of oil changes or maintenance in my fuel budget?

No — fuel cost and maintenance cost are separate. This calculation covers only the gasoline you'll burn. If you want a full picture of what a trip costs, add maintenance separately. A rough estimate is 5 to 10 cents per mile for maintenance on an older car, less on a newer one.

Why does my actual fuel cost sometimes differ from my estimate?

Real driving varies from the EPA test conditions. Idling in traffic, aggressive acceleration, cold weather, and carrying extra weight all lower fuel economy. Conversely, highway driving in good weather with light cargo can beat your estimate. Tracking your actual fill-ups over several months gives you a personal average that's more accurate than the EPA rating for your specific driving habits.

Can I calculate fuel cost if I don't know my car's mpg?

Yes. Search your vehicle on fueleconomy.gov by year, make, and model to find the EPA rating. If that doesn't work, check your owner's manual or the window sticker if you still have it. As a last resort, fill your tank, drive 100 miles, refill, and calculate it yourself — divide miles driven by gallons used.