Home › Everyday 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
distance_km | number | km | yes | Trip distance in kilometres (enter the round-trip distance for a return journey). Range: > 0, ≤ 100000 |
fuel_consumption_l_per_100km | number | L/100 km | yes | Average consumption in litres per 100 km. Range: > 0, ≤ 100 |
fuel_price_per_liter | number | per L | yes | Price per litre in your currency. Range: ≥ 0, ≤ 100 |
passengers | integer | default 1 | Number of people sharing the fuel cost, driver included. Range: ≥ 1, ≤ 100 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
fuel_liters | number | L | distance × consumption / 100. |
total_cost | number | fuel_liters × price per litre. | |
cost_per_person | number | total_cost / passengers. | |
cost_per_km | number | per km | total_cost / distance_km. |
equivalent_mpg_us | number | mpg (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
- API:
GET https://tttkmbb.com/api/v1/calculate/fuel-cost(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/fuel-cost · Markdown: https://tttkmbb.com/everyday/fuel-cost.md · JSON definition: https://tttkmbb.com/everyday/fuel-cost.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="fuel-cost" - OpenAPI operationId:
calculate_fuel_cost - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
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
- Fuel Economy Converter — Convert mpg or km/L to L/100 km first.
- Bill Split Calculator — Split any shared cost, with an optional tip.