HomeEveryday Life › Fuel Cost Calculator

Fuel Cost Calculator

Estimates the fuel needed for a trip and its cost from distance, fuel consumption in litres per 100 km and the price per litre, with the cost per person when it is shared.

When to use

You want to budget a road trip or commute, or split fuel money between passengers, and know the car's consumption in L/100 km.

Do not use when: Your consumption is in mpg or km/L (convert it first with fuel-economy), or you need total ownership costs such as tolls, wear or depreciation.

Formula

fuel_liters = distance_km × fuel_consumption_l_per_100km / 100; total_cost = fuel_liters × fuel_price_per_liter; cost_per_person = total_cost / passengers; cost_per_km = total_cost / distance_km; mpg_us = 235.215 / L_per_100km

Inputs

ParameterTypeUnitRequiredDescription
distance_kmnumberkmyesTrip distance in kilometres (enter the round-trip distance for a return journey). Range: > 0, ≤ 100000
fuel_consumption_l_per_100kmnumberL/100 kmyesAverage consumption in litres per 100 km. Range: > 0, ≤ 100
fuel_price_per_liternumberper LyesPrice per litre in your currency. Range: ≥ 0, ≤ 100
passengersintegerdefault 1Number of people sharing the fuel cost, driver included. Range: ≥ 1, ≤ 100

Outputs

OutputTypeUnitDescription
fuel_litersnumberLdistance × consumption / 100.
total_costnumberfuel_liters × price per litre.
cost_per_personnumbertotal_cost / passengers.
cost_per_kmnumberper kmtotal_cost / distance_km.
equivalent_mpg_usnumbermpg (US)235.215 / (L/100 km), for reference.

Example

350 km at 7.5 L/100 km, 1.85 per litre, 2 people: {"distance_km":350,"fuel_consumption_l_per_100km":7.5,"fuel_price_per_liter":1.85,"passengers":2}{"fuel_liters":26.25,"total_cost":48.56,"cost_per_person":24.28,"cost_per_km":0.139,"equivalent_mpg_us":31.4}

1200 km at 6.2 L/100 km, 1.60 per litre: {"distance_km":1200,"fuel_consumption_l_per_100km":6.2,"fuel_price_per_liter":1.6}{"fuel_liters":74.4,"total_cost":119.04,"cost_per_person":119.04,"cost_per_km":0.0992,"equivalent_mpg_us":37.9}

GET https://tttkmbb.com/api/v1/calculate/fuel-cost?distance_km=350&fuel_consumption_l_per_100km=7.5&fuel_price_per_liter=1.85&passengers=2

Machine access

Sources

FAQ

I know my car's mpg, not L/100 km. What do I enter?

L/100 km = 235.215 / mpg (US gallons) or 282.481 / mpg (UK imperial gallons). 30 US mpg is about 7.84 L/100 km.

Does real consumption match the manufacturer figure?

Usually not; highway driving, load, speed and air conditioning change consumption by 10–30%. Use a measured average from recent fill-ups if you have one.

Related calculators