Gas Mileage Calculator
Fuel economy in L/100 km, km/L and US mpg, plus the fuel cost of the trip and of 100 km.
What this Gas Mileage Calculator does
Fuel economy in L/100 km, km/L and US mpg, plus the fuel cost of the trip and of 100 km.
Consumption is litres used divided by kilometres driven, times 100. US mpg is 235.214583 divided by L/100 km. Cost per 100 km multiplies consumption by the price per litre. The page uses US gallons and makes no claim about imperial gallons or a vehicle's official rating.
How to use it
Enter Distance (km), Fuel used (litres), Price per litre, then press Run. The page recalculates from the values on screen and prints the rule it applied.
Worked example
Input:
Distance (km) = 500
Fuel used (litres) = 40
Price per litre = 1.5
Output:
Consumption = 8 L/100 km
Economy = 12.5 km/L
Economy (mpg US) = 29.4 mpg (US)
Fuel cost per 100 km = 12
Trip fuel cost = 60
Why it runs in your browser
This page runs entirely in this tab: no value is posted to a server, no cookie or storage entry is written, and reloading the page discards everything. Static HTML and JavaScript only — the same source served to every visitor, with no network call and no server-side executor.
Gas Mileage Calculator: Fuel economy in L/100 km, km/L and US mpg, plus the fuel cost of the trip and of 100 km.
Consumption is litres used divided by kilometres driven, times 100. US mpg is 235.214583 divided by L/100 km. Cost per 100 km multiplies consumption by the price per litre. The page uses US gallons and makes no claim about imperial gallons or a vehicle's official rating.
Worked example: Distance (km) = 500, Fuel used (litres) = 40, Price per litre = 1.5 gives Consumption = 8 L/100 km; Economy = 12.5 km/L; Economy (mpg US) = 29.4 mpg (US); Fuel cost per 100 km = 12; Trip fuel cost = 60.
How to use the Gas Mileage Calculator
Enter Distance (km), Fuel used (litres), Price per litre, then press Run. The page recalculates from the values on screen and prints the rule it applied.
This page runs entirely in this tab: no value is posted to a server, no cookie or storage entry is written, and reloading the page discards everything.
- Distance (km) — a number
- Fuel used (litres) — a number
- Price per litre — a number
The rule this page applies
Consumption is litres used divided by kilometres driven, times 100. US mpg is 235.214583 divided by L/100 km. Cost per 100 km multiplies consumption by the price per litre. The page uses US gallons and makes no claim about imperial gallons or a vehicle's official rating.
Static HTML and JavaScript only — the same source served to every visitor, with no network call and no server-side executor.
- Consumption = 8 L/100 km
- Economy = 12.5 km/L
- Economy (mpg US) = 29.4 mpg (US)
- Fuel cost per 100 km = 12
- Trip fuel cost = 60
What to Expect
Best for
- Getting the consumption quickly
- Checked arithmetic, printed with its rule
- Comparing two sets of inputs
Not ideal for
- Data this page does not carry
- A guarantee about the physical world
- Locales other than English
What this tool keeps
- Your inputs in this tab
- The rule, printed in full
- The same answer on every run
What may need cleanup
- A value the page refuses, which names the field instead of guessing
- A number outside the stated range, which is refused by name
Common errors
- A blank field is refused rather than read as zero
- A zero denominator is refused rather than printed as infinity
- A value outside the formula’s range is refused with the range named
Example use cases
- Checking a figure before you rely on it
- Homework and exam checking
- Comparing two options side by side
Sample input
Distance (km) = 500, Fuel used (litres) = 40, Price per litre = 1.5
Sample output
Consumption = 8 L/100 km; Economy = 12.5 km/L; Economy (mpg US) = 29.4 mpg (US); Fuel cost per 100 km = 12; Trip fuel cost = 60
Who this is for
- Anyone checking this figure by hand
- Students and teachers
Frequently asked questions
What does the Gas Mileage Calculator calculator do?
Fuel economy in L/100 km, km/L and US mpg, plus the fuel cost of the trip and of 100 km. It prints consumption, economy, economy (mpg us), fuel cost per 100 km, trip fuel cost.
How does this page work out the answer?
Consumption is litres used divided by kilometres driven, times 100. US mpg is 235.214583 divided by L/100 km. Cost per 100 km multiplies consumption by the price per litre. The page uses US gallons and makes no claim about imperial gallons or a vehicle's official rating.
Is anything uploaded or stored?
This page runs entirely in this tab: no value is posted to a server, no cookie or storage entry is written, and reloading the page discards everything.
Which inputs does the page read?
It reads Distance (km), Fuel used (litres), Price per litre. Every other value is derived from those.
Is this the same as a vehicle's official economy?
No. It is the economy of the distance and fuel you enter, which includes traffic, load and driving style.
Which gallon is used?
The US gallon. An imperial gallon is about 20% larger, so an imperial mpg figure would be higher.
Can I leave the price at zero?
Yes. The economy figures are then the answer and the two cost lines read zero.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.