# Fuel Economy Converter

Convert fuel economy between km/L, L/100 km and US or UK MPG.

## URL

https://ilham.dev/tools/fuel-economy-converter/

## What It Does

A one-in, four-out fuel economy converter. Type a figure, choose the unit it is in, and km/L, L/100 km and both MPG figures update as you type. All four units are defined by an exact conversion to km/L and back, so a value and its round trip agree. The maths runs in the page and nothing is uploaded.

## Features

- Runs in the browser
- No login required

## Input

text input.

## Output

text output.

## Privacy

Processing happens locally in the browser.

No input data is uploaded to ilham.dev.

- Requires login: false
- Requires API key: false
- Stores user data: false


## Examples

- Why are there two MPG values?
- Which direction is better?
- How is L/100 km converted?
- What are the exact MPG factors?
- Is the result rounded?




## Questions

### Why are there two MPG values?

Because the US and UK gallons are not the same size. A UK gallon is about 20% larger, so the same car always shows a higher UK MPG figure. The converter keeps both so a review or a spec sheet written in either country can be read without guessing.

### Which direction is better?

Higher km/L and higher MPG are better; lower L/100 km is better. That inversion is the usual reason a plain percentage change is confusing — a 10% drop in L/100 km is an improvement, not a loss.

### How is L/100 km converted?

It is the reciprocal relationship: L/100 km equals 100 divided by km/L, and km/L equals 100 divided by L/100 km. That is why the two curves are not linear and small L/100 km figures turn into very large km/L figures.

### What are the exact MPG factors?

This implementation multiplies km/L by `2.352145833` for US MPG and `2.824809` for UK MPG. Those factors are rounded constants in the code, not a claim of exact precision beyond the displayed digits.

### Is the result rounded?

Each value is rounded to at most three decimal places for display, with trailing zeros omitted. The calculation happens before this display rounding.

