The Quick Answer
To estimate how much gas will cost for any trip, use this formula:
Fuel Cost = (Trip Distance ÷ Vehicle MPG) × Gas Price per Gallon
For a 400-mile trip in a car that gets 28 MPG with gas at $3.50/gallon: 400 ÷ 28 = 14.3 gallons × $3.50 = $50.00.
For metric units (L/100km): Fuel Cost = (Distance in km ÷ 100) × L/100km × Price per Liter.
Use our gas cost calculator to run the numbers instantly, including round-trip cost, fuel volume needed, and CO₂ emissions.
The Formula Explained Step by Step
The gas cost formula has three inputs. Get these right and the math is simple.
Step 1: Find the Distance
Measure or estimate the total miles (or kilometers) you'll drive. Include detours, city driving to reach the highway, and the return trip if applicable.
- One-way trip: Use the distance as-is.
- Round trip: Double the one-way distance.
- Multi-stop trip: Add up each leg.
Step 2: Know Your Vehicle's Fuel Efficiency
Fuel efficiency tells you how far your vehicle travels per unit of fuel:
- MPG (miles per gallon): Used in the US. Higher is better. A car rated at 30 MPG travels 30 miles on one gallon.
- L/100km (liters per 100 kilometers): Used in most other countries. Lower is better. A car rated at 7.5 L/100km uses 7.5 liters for every 100 km.
Where to find your MPG:
- Owner's manual
- Sticker inside the driver's door jamb
- fueleconomy.gov (US EPA ratings)
- Track it yourself: miles driven ÷ gallons at your last fill-up
For a deeper explanation of MPG and L/100km, see our guide on how to calculate fuel economy.
Step 3: Check the Gas Price
Use the current price per gallon (or per liter) at stations along your route. Prices vary by region — highway stations tend to cost more than stations a short detour off the exit.
Putting It Together
| What you need | Imperial (US) | Metric |
|---|---|---|
| Distance | miles | kilometers |
| Efficiency | MPG (higher = better) | L/100km (lower = better) |
| Price | $/gallon | $/liter or €/liter |
| Formula | (miles ÷ MPG) × $/gal | (km ÷ 100) × L/100km × $/L |
Worked Examples
Example 1: Short Weekend Trip
- Distance: 280 miles round trip
- Vehicle: Mid-size sedan, 27 MPG
- Gas price: $3.45/gallon
Calculation: 280 ÷ 27 = 10.37 gallons needed 10.37 × $3.45 = $35.78 Cost per mile: $35.78 ÷ 280 = $0.128/mile
Example 2: Cross-Country Road Trip
- Distance: 2,500 miles one-way (5,000 round trip)
- Vehicle: SUV, 22 MPG
- Gas price: $3.60/gallon (average across states)
One-way: 2,500 ÷ 22 = 113.6 gallons 113.6 × $3.60 = $409.09
Round trip: $409.09 × 2 = $818.18 Total fuel: 227.3 gallons
That's roughly $0.164 per mile in fuel alone.
Example 3: Daily Commute (Metric)
- Distance: 35 km each way, 70 km round trip
- Vehicle: 7.2 L/100km
- Fuel price: €1.80/liter
- Workdays per month: 22
Daily cost: (70 ÷ 100) × 7.2 = 5.04 liters 5.04 × €1.80 = €9.07/day
Monthly cost: €9.07 × 22 = €199.54/month
Over a year (assuming 48 work weeks): roughly €2,177 in commute fuel alone.
Example 4: Same Trip, Different Vehicles
A 500-mile trip at $3.50/gallon — how vehicle choice affects cost:
| Vehicle | MPG | Gallons | Cost | Cost/Mile |
|---|---|---|---|---|
| Hybrid (Toyota Prius) | 52 | 9.6 | $33.65 | $0.067 |
| Compact car | 33 | 15.2 | $53.03 | $0.106 |
| Mid-size sedan | 28 | 17.9 | $62.50 | $0.125 |
| SUV | 23 | 21.7 | $76.09 | $0.152 |
| Pickup truck | 18 | 27.8 | $97.22 | $0.194 |
| Large RV | 10 | 50.0 | $175.00 | $0.350 |
The pickup costs nearly 3× the hybrid's fuel for the same 500 miles.
What Changes Real-World Fuel Cost
The formula gives you an estimate. Here's what makes the actual number higher or lower.
Driving Speed
Fuel efficiency drops at higher speeds due to aerodynamic drag. Most vehicles reach peak efficiency between 35–55 mph. Above 55, each additional 5 mph can reduce efficiency by 7–14%.
Practical effect: driving 75 mph instead of 65 mph on a 500-mile highway trip might cost an extra $8–$15 in fuel, depending on the vehicle.
City vs. Highway Driving
Stop-and-go city driving uses more fuel than steady highway cruising. The EPA rates vehicles separately for city and highway MPG — real-world efficiency on a road trip is usually closer to the highway number, while daily commuting in traffic often matches the city number.
Temperature and Weather
- Cold weather: Engines use more fuel during warm-up. Short trips in winter are the least efficient.
- Hot weather: Air conditioning can reduce fuel economy by up to 25% in heavy use, though its effect at highway speeds (where aerodynamic drag dominates) is smaller.
- Wind: Headwinds increase drag. A strong headwind can reduce highway MPG by 10% or more.
Vehicle Load
Extra weight means more fuel burned. The EPA estimates each 100 lbs of added weight reduces fuel economy by about 1%. Roof-mounted cargo racks create additional drag — even when empty, a roof rack can reduce highway fuel economy by 2–8%.
Tire Pressure
Underinflated tires increase rolling resistance. Each psi below the recommended pressure costs roughly 0.1–0.3% in fuel efficiency. For a vehicle with 32 psi recommended pressure and all four tires at 28 psi, that's a 1–5% efficiency loss.
Terrain
Mountain driving and hilly terrain increase fuel consumption. Climbing burns more fuel; descending recovers some through coasting, but not all of it. Budget 10–20% more fuel for mountainous routes.
How to Reduce Trip Gas Cost
These tips won't change physics, but they reduce how much fuel you burn:
-
Maintain 55–65 mph on highways. The sweet spot for most vehicles. Each 5 mph over 65 increases fuel burn disproportionately.
-
Use cruise control on flat highways. Steady speed beats constant speed adjustments. Disable it on hilly terrain where it can cause inefficient throttle surges.
-
Check tire pressure before the trip. Inflate to the vehicle's recommended psi (printed on the door jamb sticker, not the tire sidewall maximum).
-
Remove unnecessary weight and roof racks. Luggage in the trunk is better than on the roof. Every 100 lbs saved improves MPG by about 1%.
-
Fill up off the highway. Gas stations at highway exits often charge $0.20–$0.50 more per gallon than stations a short detour into town.
-
Drive smoothly. Gradual acceleration and anticipating stops (coasting to red lights instead of braking hard) can improve real-world MPG by 15–30% in city driving.
-
Plan your route to minimize distance. Sometimes the shortest route isn't the most fuel-efficient — fewer stops and steadier speeds on a slightly longer highway route can use less fuel than a shorter route through cities.
Gas Cost vs. Total Driving Cost
Fuel is the most visible expense, but not the only one. For context, here's how fuel fits into the full cost of driving:
| Cost component | Typical range per mile |
|---|---|
| Fuel | $0.07–$0.20 |
| Depreciation | $0.10–$0.25 |
| Insurance | $0.05–$0.10 |
| Maintenance | $0.05–$0.10 |
| Total | $0.30–$0.70 |
Fuel typically accounts for 20–40% of total per-mile driving cost. When comparing a road trip to flying, include tolls, parking, and extra travel time alongside fuel cost.
FAQ
How do I calculate gas cost for a trip?
Divide the trip distance by your vehicle's MPG, then multiply by the gas price per gallon. For a 300-mile trip at 25 MPG with gas at $3.50: 300 ÷ 25 = 12 gallons × $3.50 = $42.00.
How much does it cost in gas to drive 1,000 miles?
At the US average of about 25 MPG and $3.50/gallon: 1,000 ÷ 25 = 40 gallons × $3.50 = $140. Your actual cost depends on your vehicle's MPG and local gas prices.
How much gas does a 4-hour drive use?
It depends on speed and MPG. At 65 mph for 4 hours (260 miles) in a car getting 28 MPG: 260 ÷ 28 = 9.3 gallons.
Is it cheaper to drive or fly?
For solo travelers on trips over 500 miles, flying is often cheaper and faster when you factor in fuel, tolls, food, and time. For families of 3+ or trips under 400 miles, driving is usually cheaper. The break-even point depends on airfare, gas prices, and the number of passengers.
How do I calculate gas cost per mile?
Divide the gas price per gallon by your MPG. At $3.50/gallon and 25 MPG: $3.50 ÷ 25 = $0.14 per mile. At 35 MPG: $3.50 ÷ 35 = $0.10 per mile.
What is the most fuel-efficient speed for highway driving?
Most vehicles are most fuel-efficient between 35–55 mph. For highway driving, 55–65 mph is the practical sweet spot balancing fuel economy and travel time. Above 65, aerodynamic drag increases sharply.
How much CO₂ does my trip produce?
Multiply gallons used by 8.89 kg (or liters by 2.35 kg). A 500-mile trip using 20 gallons produces about 178 kg of CO₂. For reference, the average American produces about 16 metric tons of CO₂ per year from all sources.
Does premium gas improve fuel economy?
Not in vehicles designed for regular gas. Using premium (higher octane) fuel in a car that doesn't require it provides no MPG benefit. Only use premium if your owner's manual specifically requires or recommends it.
How do gas prices vary by US state?
Gas prices can differ by $1.00 or more per gallon across states due to taxes, refinery proximity, and regulations. California, Hawaii, and Washington typically have the highest prices. Texas, Oklahoma, and Mississippi tend to be the cheapest. Check current prices along your route before a long trip.
How do I calculate fuel cost for an RV?
The same formula applies, but RVs have much lower MPG (typically 6–12 MPG depending on size). A 500-mile trip in an RV averaging 10 MPG at $3.50/gallon: 500 ÷ 10 = 50 gallons × $3.50 = $175. That's 3–5× the cost of the same trip in a sedan.
Related Tools
- Gas Cost Calculator — instantly estimate fuel cost for any trip distance and vehicle
- Fuel Economy Calculator — calculate your real-world MPG or L/100km from fill-up data
- Distance Formula Calculator — compute straight-line distance between two points
- Speed Unit Converter — convert between mph, km/h, knots, and more
- Kilometers to Miles — quick distance unit conversion