How this gas mileage calculator works
Fuel economy tells you how far a vehicle travels on a given amount of fuel. In the United States it is usually expressed as miles per gallon (MPG), while most of the rest of the world uses litres per 100 kilometres (L/100 km). This calculator works in either system: enter the distance you drove and the fuel you burned, and it returns your economy, your cost per mile or kilometre, and your total fuel cost.
The core formula is simple. In US units, MPG = miles driven ÷ gallons used. To get the most accurate figure, fill the tank completely, reset the trip meter, drive normally, then refill and note exactly how many gallons it took to top up — that fuel is what powered the recorded distance.
To convert between the two scales, divide 235.215 by the US MPG to get L/100 km, and divide 235.215 by L/100 km to get MPG back. The table below shows the conversion for common values so you can sanity-check the tool at a glance.
| MPG (US) | L/100 km | km / L |
|---|---|---|
| 20 | 11.76 | 8.50 |
| 25 | 9.41 | 10.63 |
| 30 | 7.84 | 12.75 |
| 40 | 5.88 | 17.00 |
| 50 | 4.70 | 21.25 |
Reference note: figures use US gallons (1 gallon = 3.785411784 litres) and the standard 235.215 conversion constant. Imperial (UK) gallons differ and are not used here.
Frequently asked questions
- How do I calculate MPG?
- Divide the miles you drove by the gallons you used. Drove 300 miles on 10 gallons? That is 300 ÷ 10 = 30 MPG. Fill up, reset the trip meter, drive, then refill and note the gallons added for an accurate result.
- What is good gas mileage?
- For a modern petrol car, above about 30 MPG (around 7.8 L/100 km) is good, and 40 MPG or more is very efficient. Hybrids often reach 50 MPG. The benchmark depends on vehicle type, engine size, and driving conditions.
- How do I convert MPG to L/100km?
- Divide 235.215 by the US MPG figure. So 30 MPG is 235.215 ÷ 30 ≈ 7.84 L/100 km. A higher MPG means fewer litres per 100 km, since the two scales move in opposite directions.
- How do I calculate cost per mile?
- Multiply the fuel price per gallon by the gallons used, then divide by the miles driven — or simply divide the price per gallon by your MPG. At $3.50/gallon and 30 MPG, that is about $0.117 per mile.
- What is L/100km?
- Litres per 100 kilometres is the metric measure of fuel consumption used across much of the world. It states how many litres a vehicle burns to travel 100 km — lower numbers mean better economy.
- How can I improve my fuel economy?
- Keep tyres inflated, drop excess weight and roof racks, avoid hard acceleration and braking, hold a steady speed, and keep up with servicing. Combining trips and cutting idling also helps.