Gas cost calculator for your trip

Divide the miles you will drive by your car's miles per gallon (mpg) to get the gallons needed, then multiply by the price per gallon. A 200-mile trip at 28 mpg uses 7.14 gallons, and at $3.40 a gallon that is $24.29. Check round trip and enter the number of riders to split the cost.
- ✅ Free
- 🔒 No sign-up
- 📱 Works on mobile
- ⚡ Instant results
Estimate only. Real fuel economy changes with speed, load, weather and terrain: measure it over several fill-ups for a reliable figure.
🔒 Everything runs in your browser. Your data and files never leave your device.
Gas cost formulas
\[ \text{gallons needed} = \dfrac{\text{miles}}{\text{mpg}} \]
\[ \text{trip cost} = \text{gallons} \times \text{price per gallon} \]
\[ \text{your mpg} = \dfrac{\text{miles driven}}{\text{gallons added at the fill-up}} \]
To measure your own mpg, fill the tank, reset the trip odometer, drive, then fill up again. Divide the miles on the trip meter by the gallons the pump added.
Fuel economy and cost per mile
Cost per mile is the price per gallon divided by mpg. It shows how much a better car saves.
\[ \text{cost per mile} = \dfrac{\text{price per gallon}}{\text{mpg}} \]
| mpg | Cost per mile at $3.50 | Cost of 1,000 miles |
|---|---|---|
| 20 | $0.175 | $175 |
| 30 | $0.117 | $117 |
| 40 | $0.088 | $88 |
Switch to metric to see liters and L/100 km: L/100 km = 235.215 ÷ mpg, so 28 mpg is 8.4 L/100 km.
3 real-life examples
A 200-mile weekend drive at 28 mpg
Gallons: \( \dfrac{200}{28} = 7.14 \). Cost at $3.40 a gallon: \( 7.14 \times 3.40 = \) $24.29.
A 1,200-mile road trip, round trip, 4 people
Total distance 2,400 miles at 30 mpg is 80 gallons. At $3.50, that is $280, or $70 per person.
Finding your real mpg
You drove 280 miles and the pump added 10 gallons: \( \dfrac{280}{10} = \) 28 mpg, or 8.4 L/100 km.