Calculate Gas Cost for a Road Trip: Formula and Example
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
To calculate gas cost for a road trip, divide the trip distance by your vehicle’s fuel economy, then multiply the fuel needed by the price per unit of fuel. Enter distance, fuel economy, and fuel price to estimate the total fuel cost; the result is an estimate, not a guaranteed amount.
Formula
Gas cost = distance ÷ fuel economy × fuel price. In symbols, C = D ÷ E × P. C is estimated fuel cost in dollars; D is trip distance in miles; E is fuel economy in miles per gallon (mpg); and P is fuel price in dollars per gallon. The calculator first estimates the gallons required, then multiplies that quantity by the price per gallon.
For metric units, use the matching form: cost = distance in kilometres ÷ fuel economy in kilometres per litre (km/L) × price per litre. Keep the units consistent throughout. If your fuel economy is expressed in litres per 100 kilometres (L/100 km), use: litres needed = distance in kilometres × L/100 km ÷ 100, then multiply by price per litre.
Worked Example
Using the calculator’s default inputs—300 miles, 30 mpg, and $3.50 per gallon:
- Estimate fuel needed: 300 miles ÷ 30 miles per gallon = 10 gallons.
- Multiply by the fuel price: 10 gallons × $3.50 per gallon = $35.00.
The estimated gas cost is $35.00, and the estimated fuel needed is 10 gallons. The displayed fuel quantity is rounded to two decimal places; the cost is also displayed to two decimal places.
How to Calculate a Trip Estimate
Use the full driving distance, not the straight-line distance between your starting point and destination. If the route has several legs, add their distances first or calculate each leg separately and add the estimated costs.
- Find the route distance. Include planned detours, side trips, and any return journey if you need a round-trip estimate.
- Choose a realistic fuel-economy figure. A vehicle’s observed average for similar driving is often more useful than a best-case figure. The estimate may change with speed, traffic, terrain, load, weather, and driving conditions.
- Use a current fuel price. Enter the price per gallon or litre that applies to the fuel you expect to buy. Prices can differ between locations and change during a trip.
- Calculate and review the result. Check that the estimated quantity of fuel is plausible for the distance and vehicle before relying on the cost figure.
For a trip with changing prices or different driving conditions, break the route into sections. Estimate each section using its own distance, fuel economy, and price, then add the section costs. This can be more representative than applying one average price and one efficiency figure to the entire route.
Fuel Economy and Unit Conversions
Fuel economy can be stated in different ways. In the United States, vehicle fuel economy is commonly shown in miles per gallon; in metric contexts it may be given as kilometres per litre or litres per 100 kilometres. The first two are “distance per fuel” measures, where a higher number means more distance from each unit of fuel. L/100 km measures fuel consumed over a fixed distance, so a lower number means less fuel used.
Do not mix US gallons and imperial gallons: they are different volumes. Also do not enter kilometres as miles or litres as gallons. Convert one side of the calculation so that distance, fuel economy, and price use compatible units. For reference, 1 US gallon is approximately 3.785 litres, and 1 mile is approximately 1.609 kilometres. Conversion and rounding can cause small differences between estimates.
What the Estimate Includes—and Leaves Out
This calculation estimates the fuel cost for the stated distance and assumptions. It does not include tolls, parking, food, lodging, vehicle wear, or other travel expenses. It also does not predict the exact amount of fuel a particular trip will use. A route with steep climbs, stop-and-go traffic, cold starts, heavy cargo, or sustained high speeds may use more fuel than a vehicle’s typical figure suggests.
One common misconception is that a vehicle’s advertised or highest listed mpg will apply throughout a road trip. Such figures are not a promise of actual trip efficiency. Use an average suited to your route and driving, and consider a small practical buffer if being short on fuel would disrupt your plans. The calculator itself does not determine how much reserve is appropriate for a specific route or vehicle.
Common Calculation Mistakes
- Using the wrong trip length: A one-way distance is not a round-trip distance. Double it only when the return route is the same length and you want a return estimate.
- Mixing units: Miles with km/L, or litres with a price per gallon, makes the result invalid unless you convert.
- Confusing mpg with L/100 km: They move in opposite directions. Do not use an L/100 km figure as if it were miles per gallon.
- Rounding too early: Keep unrounded values during intermediate steps where possible, then round the final estimate to cents. Actual spending will still vary with pump prices and fuel purchased.
- Treating the estimate as a fixed bill: The result depends on the inputs; it is not a quote or a record of the exact fuel used.
Frequently Asked Questions
How do I calculate gas cost for a round trip?
Use the total distance for both directions, including any planned stops or detours, then apply distance ÷ mpg × price per gallon. If the return route differs, add the two route distances rather than simply doubling the outbound distance.
How much gas will I need for my trip?
Divide the trip distance by fuel economy when using miles and mpg, or kilometres by km/L when using metric distance-per-fuel units. For example, 300 miles at 30 mpg requires an estimated 10 gallons.
How do I calculate fuel cost in litres?
With distance in kilometres and efficiency in km/L, calculate kilometres ÷ km/L to get litres, then multiply by price per litre. If efficiency is in L/100 km, calculate kilometres × L/100 km ÷ 100 instead.
Should I use city or highway mpg?
Use a figure that best reflects the trip. For a mixed route, a realistic average is more suitable than either a city-only or highway-only figure, especially if traffic, hills, or speed are likely to affect fuel use.
Why is my actual gas cost different from the estimate?
The route distance, fuel price, and actual fuel economy may differ from the inputs. Traffic, terrain, weather, driving style, vehicle load, and stops can affect fuel consumption, while prices can vary along the route.
Related
Formula used
in d | Trip distance | miles | 300 | 0 in e | Fuel economy | miles per gallon | 30 | 0 in p | Fuel price | dollars per gallon | 3.50 | 0 out cost | Estimated gas cost | dollars | d / e * p | 2 out fuel | Fuel needed | gallons | d / e | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.