Gas Trip Calculator
Calculate the fuel cost for a road trip including detours and a buffer.
Formula and sources updated · Data sources · 2View algorithm, constants and default inputs (JSON)
Comparison
About this calculator
Estimate fuel use and cost from one-way miles, US mpg, US dollars per gallon, and the return-trip setting. The buffer is an extra distance you choose; it does not guarantee coverage for detours, idling, terrain, or traffic. Refuel stops assume a full tank at the start and full-tank refills.
Worked example
calculated with the default values below
One-way distance 450 mi · Fuel economy 28 mpg · Fuel price 3.5 USD/gal · Return trip Return trip · User-chosen extra distance 10 % · Tank size 15 gal · People splitting the cost 2 Total distance 990 mi · Fuel needed 35.36 gal · Fuel cost 123.75 USD · Cost per person 61.88 USD · Estimated full-tank refill stops 2 · Cost per mile 0.125 USD
Data sources
Disclaimer
These calculators give general estimates. Sizing, pricing, availability and standards vary by brand, retailer and country, so treat the output as a starting point and confirm it against the seller's or authority's own figures.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
D = d × k × (1 + b/100); gal = D/mpg; C = gal × p; perPerson = C/n_p; refuels = max(0, ceil(gal/T) − 1)
- d
- One-way distance (mi)
- k
- Trip factor (1 or 2)
- b
- User-chosen extra-distance percentage
- mpg
- US miles per gallon
- p
- US dollars per gallon
- T
- Tank size (US gal)
- n_p
- Passengers splitting the cost
- C
- Total fuel cost (USD)
The buffer is an editable scenario input, not a guarantee. Stops assume departure with a full tank and full refills; ceil(gal/T) − 1 estimates stops after the initial tank. Cost per person splits the total equally across entered passengers.
Frequently asked questions
What does the distance buffer represent?
The model multiplies the one-way miles by one or two for the trip type, then by 1 + the buffer percentage you choose. At 450 miles one way, a 10% buffer and return trip give 990 modeled miles. The buffer is not a guarantee for real detours or driving conditions. Refill stops assume a full tank at departure and full refills.