## How to convert kilometer / liter to mpg: mpg = (km/lt) * 2.35214583

In the USA, MPG is an almost required index to see how efficient a car can get.
However, except USA, MPG is not so commonly used.
I find Europe and Japan uses kilometer per liter. Oops, how do we convert it to MPG?
Converting kilometer to miles and liter to gallons, then division?
It is very simple if you know some math, you notice all these conversions are linear, so you can make one time multiplication to convert it.

The simple equations are:

mpg = (km/lt) * 2.352
km/lt = mpg * 0.425

So,

10 km/lt = 23.52 mpg
20 km/lt = 47.04 mpg

30 mpg = 12.75 km/lt
50 mpg = 21.25 km/lt

If you want to have more precision, this is for you:

```#[kmpl2mpg]
#kilometer per liter to mpg

class kmpl2mpg:
def convert(kmpl):
return kmpl * 2.35214583 # this is just a short cut
convert = staticmethod(convert)

if __name__ == "__main__":
import sys
try:
print 'KMPL2MPG(%.2f) = %.2f mpg' % (float(sys.argv), kmpl2mpg.convert(float(sys.argv)))
except:
print 'usage: python kmpl2mpg.py 7.9'

```

Now you know Mercedes S400 Hybrid gets 29.64 mpg (12.6 km/liter)
Also you can check the result in google

Advertisements