Fuel cost calculator
Enter distance, fuel amount and price, ideally from one full tank to the next. Everything runs in your browser.
The formulas
Consumption (l/100 km) = liters ÷ kilometers × 100.
mpg (US) = 235.215 ÷ l/100 km. mpg (UK) = 282.481 ÷ l/100 km.
Cost per 100 km = total cost ÷ kilometers × 100.
Worked example
You drove 300 miles (482.8 km) and added 9.5 US gallons (35.96 l) for $34.20. That's 35.96 ÷ 482.8 × 100 = 7.45 l/100 km, about 31.6 mpg (US), at $7.08 per 100 km.
Why one fill-up isn't enough
A single fill-up is a snapshot: winter, city traffic or a trailer skew the result. The number only becomes meaningful across many fill-ups. That's what CarAi is for: log each one and get the average automatically.
Keep reading
mpg converter
Convert mpg (US), mpg (UK), l/100 km and km/l.
GuideHow to calculate mpg
The full-tank method, step by step, with the formulas.
GuideKeep a fuel log
What to record and how to calculate it right.
Updated November 2026