Fuel Cost Calculator — Gas Cost for a Trip or Road Trip
Estimate the gas cost of a commute, errand or cross-country road trip in seconds
Before a road trip, a long commute, or a weekend drive to the lake, the first question is almost always the same: how much will gas cost? This fuel cost calculator answers it in one step. You enter how far you're driving in miles, your car's fuel economy in miles per gallon (MPG), and the price of gas per gallon — and it returns the gallons you'll burn and the total dollars you'll spend, with a round-trip option that doubles the distance for you.
The math is simple and worth knowing by heart. Fuel cost depends on three numbers and nothing else:
Gallons needed = distance (miles) ÷ MPG
Trip fuel cost = gallons × price per gallon = (distance ÷ MPG) × price
Say you're driving 300 miles in a car that gets 25 MPG, and gas is $3.50 a gallon. You'll use 300 ÷ 25 = 12 gallons, which costs 12 × $3.50 = $42.00 one way. Make it a round trip and you double the distance to 600 miles, 24 gallons, and $84.00 total. That's the whole calculation — but seeing it laid out keeps you from guessing.
Three practical notes that change the answer more than people expect:
MPG is not one number. Highway MPG is usually higher than city MPG, sometimes by 30% or more. A pickup rated "18 city / 24 highway" will cost noticeably more in stop-and-go traffic than on the interstate. Use the figure that matches your drive, or split the trip if it's mixed.
Gas prices swing by region and grade. A gallon can cost a dollar more in California than in Texas, and premium runs well above regular. Pull the price you'll actually pay — the pump near your route, not last month's national average.
A loaded car, a roof box, towing, cold weather, and a heavy right foot all cut your real MPG. If you're hauling people and gear across the country, plug in a slightly lower MPG than the sticker to stay realistic.
This calculator owns the road-trip question: what will the gas cost? It's the companion to a gas mileage calculator, which works the other direction — you give it miles driven and gallons filled, and it tells you your true MPG. Use that one to learn your car's real fuel economy, then bring the number here to price out any drive. The figures here are an estimate for planning, not a guaranteed cost — your actual spend depends on traffic, terrain, load and the price at the pump on the day you fill up.
Calculator
Fill in the fields and click "Calculate" for instant results.
📰 Formula
• Gallons needed = distance (miles) ÷ MPG • Trip fuel cost = gallons × price per gallon • Combined: cost = (distance ÷ MPG) × price per gallon • Round trip: multiply the distance by 2 before dividing • Cost per mile = price per gallon ÷ MPG
📰 Formula
• Gallons needed = distance (miles) ÷ MPG • Trip fuel cost = gallons × price per gallon • Combined: cost = (distance ÷ MPG) × price per gallon • Round trip: multiply the distance by 2 before dividing • Cost per mile = price per gallon ÷ MPG
🧪 Worked examples
Example 2
Example 3
Example 4
⚠️ Common mistakes
- Multiplying miles by MPG instead of dividing — gallons = miles ÷ MPG, not miles × MPG.
- Using the sticker's highway MPG for a city drive (or vice versa), which skews the cost.
- Forgetting to double the distance for a round trip.
- Entering the price for the wrong grade or region — premium and California cost much more.
- Ignoring load, towing, AC and cold weather, which all lower real-world MPG.
💡 Tips
- Use your car's combined or real-world MPG, not the best-case highway number, for an honest estimate.
- Check the pump price along your actual route — apps show prices station by station.
- Cost per mile (price ÷ MPG) is a quick way to compare two cars or two routes.
- For a mixed city/highway trip, run it twice and add the results, or use a middle MPG figure.
- Add a 5–10% buffer for traffic, hills and a full load so you aren't caught short.
Embed this calculator on your site
Copy the code below and paste it into the HTML of your site or blog.
<iframe src="https://www.calcnimbus.com/embed/fuel-cost-calculator" width="100%" height="500" frameborder="0" style="border:1px solid #eee;border-radius:12px"></iframe>
❓ Frequently asked questions
How do I calculate the fuel cost of a trip?
Divide the trip distance by your car's MPG to get gallons, then multiply by the price per gallon. Example: 300 miles ÷ 25 MPG = 12 gallons × $3.50 = $42.00.
How many gallons of gas will I use on a trip?
Gallons = distance in miles ÷ MPG. A 300-mile drive at 25 MPG uses 300 ÷ 25 = 12 gallons. Use your real-world MPG for the closest estimate.
How do I figure gas cost for a round trip?
Double the one-way distance first, then divide by MPG and multiply by the gas price. A 300-mile each-way trip is 600 miles, so at 25 MPG and $3.50/gal it costs $84.00.
What MPG should I use — city or highway?
Match the figure to your drive. Use highway MPG for interstate trips, city MPG for stop-and-go, or your combined/real-world MPG for a mixed route. Highway is often 20–30% higher than city.
How much does my daily commute cost in gas?
Multiply your round-trip commute miles by the days you drive, divide by MPG, then multiply by the gas price. A 40-mile daily round trip at 30 MPG and $3.80/gal is about $5.07 a day, or roughly $25 a week.
Why is my actual gas cost higher than the estimate?
Real MPG drops with city traffic, a heavy load, towing, a roof box, running the AC, cold weather and aggressive driving. If any apply, plug in a lower MPG than the window sticker.
How do I calculate cost per mile for gas?
Cost per mile = price per gallon ÷ MPG. At $3.50/gal and 25 MPG, that's $3.50 ÷ 25 = $0.14 per mile. It's a fast way to compare vehicles or routes.
How can I split fuel costs with friends on a road trip?
Calculate the total trip fuel cost here, then divide by the number of people sharing it. For a $196 round trip split four ways, each person owes about $49.
Does this calculator work for electric vehicles?
Not directly — EVs use kWh, not gallons. For an EV, use an electricity cost calculator with your miles, the car's miles-per-kWh efficiency and your price per kWh instead of MPG and gas price.