How FuelTripCost calculations work
Every result comes from visitor-supplied numbers and the formulas below. FuelTripCost does not currently use live route, traffic, pump-price, toll, parking, vehicle, weather, or exchange-rate feeds.
Fuel required and fuel cost
US gallons = miles ÷ US MPG
Imperial gallons = miles ÷ Imperial MPG
Litres = kilometres × L/100 km ÷ 100
Fuel cost = fuel used × price per matching volume unit
The fuel cost calculator converts distance and fuel volume internally when the economy unit and price-volume unit differ. The visible preset keeps common combinations aligned.
Fuel economy measurements
Measured economy uses distance and fuel from the same interval: US MPG = miles ÷ US gallons; Imperial MPG = miles ÷ Imperial gallons; L/100 km = litres ÷ kilometres × 100; and km/L = kilometres ÷ litres. Higher MPG and km/L represent more distance per unit of fuel, while lower L/100 km represents less fuel per fixed distance.
Unit conversions
- 1 mile = exactly 1.609344 kilometres.
- 1 US gallon = 3.785411784 litres.
- 1 Imperial gallon = 4.54609 litres.
- L/100 km = 235.214583 ÷ US MPG.
- L/100 km = 282.480936 ÷ Imperial MPG.
The mile and US-gallon relationships are consistent with the NIST Guide to the SI conversion factors. Imperial conversion uses the defined 4.54609-litre gallon.
Cost per mile or kilometre
Fuel cost per distance = total fuel cost ÷ total trip distance. With US units this can also be written as price per US gallon ÷ US MPG. This is fuel cost only and excludes depreciation, finance, insurance, maintenance, tires, taxes, tolls, parking, and time.
Round trips and additional expenses
Round trip doubles the entered one-way distance before fuel is calculated. Tolls, parking, and other fees are not doubled: the visitor enters a total for the entire selected trip. The road-trip total is fuel + tolls + parking + other costs.
Passenger splitting
Passenger share = complete entered trip total ÷ whole-number passenger count. The calculator performs an equal split. It does not decide who should pay or whether the driver participates.
Rounding
Intermediate calculations retain JavaScript number precision. Currency normally displays to two decimal places. Very small per-distance costs can show up to four decimals, and small nonzero fuel quantities can show additional precision so they are not displayed as zero. Examples may round fuel to two decimals after the underlying calculation.
Validation and tests
Distance and economy must be greater than zero. Fuel price and fees may be zero but not negative. Passenger count must be a positive whole number. Inputs are capped to prevent impractically large values and results are rejected if arithmetic produces a non-finite value. Automated tests cover formulas, metric consumption, US and Imperial conversions, synchronized presets, price clearing on currency changes, round trips, fee handling, passenger splitting, invalid formats, and upper bounds.
Assumptions and limits
A round trip assumes the return distance matches the outward leg. A single economy value is treated as representative for the whole drive, and a single price is treated as representative for all fuel. In real driving, congestion, climate, speed, route, load, maintenance, and driving behavior can change consumption. The US EPA explains how official label estimates are produced; FuelTripCost does not reproduce those laboratory procedures or claim that a label value will equal an individual trip.