Method Deck / units

Fuel economy conversion

Converts fuel economy between mpg (US), mpg (UK), L/100km, and km/L, correctly inverting the L/100km reciprocal rate.

Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.

Try it

Inputs

Outputs

Steps

  1. Convert the input to km/L (the pivot unit): km/L = value directly if already km/L; km/L = 100/value if L/100km (an inversion, since L/100km is a reciprocal rate); km/L = value * 1.609344/3.785411784 if mpg (US); km/L = value * 1.609344/4.54609 if mpg (UK).
  2. Convert km/L to the target unit: value = km/L directly if km/L; value = 100/(km/L) if L/100km (an inversion); value = km/L * 3.785411784/1.609344 if mpg (US); value = km/L * 4.54609/1.609344 if mpg (UK).
  3. Round result to 6 significant figures.

Constants

Sources

Worked example and test vectors

NameInputsAnswer
worked example{"value":30,"from_unit":"mpg_us","to_unit":"l_100km"}7.84049 L/100km
test vector: L/100km back to mpg (US) confirms the inversion{"value":7.840486,"from_unit":"l_100km","to_unit":"mpg_us"}30.0000 mpg (US)
test vector: mpg (UK) to km/L{"value":40,"from_unit":"mpg_uk","to_unit":"km_l"}14.1602 km/L

Published card