Weight Conversion

Convert measurements between a number of different weight formats.

kg
Copy  •  js
if(prop("Unit") == "kg", prop("Amount"), if(prop("Unit") == "st", round(prop("Amount") * 6.35 * 1000) / 1000, if(prop("Unit") == "lb", round(prop("Amount") / 2.205 * 1000) / 1000, if(prop("Unit") == "oz", round(prop("Amount") / 35.274 * 1000) / 1000, 0))))
st
Copy  •  js
if(prop("Unit") == "kg", round(prop("Amount") / 6.35 * 1000) / 1000, if(prop("Unit") == "st", prop("Amount"), if(prop("Unit") == "lb", round(prop("Amount") / 14 * 1000) / 1000, if(prop("Unit") == "oz", round(prop("Amount") / 224 * 1000) / 1000, 0))))
lb
Copy  •  js
if(prop("Unit") == "kg", round(prop("Amount") * 2.205 * 1000) / 1000, if(prop("Unit") == "st", round(prop("Amount") * 14 * 1000) / 1000, if(prop("Unit") == "lb", prop("Amount"), if(prop("Unit") == "oz", round(prop("Amount") / 16 * 1000) / 1000, 0))))
oz
Copy  •  js
if(prop("Unit") == "kg", round(prop("Amount") * 35.274 * 1000) / 1000, if(prop("Unit") == "st", round(prop("Amount") * 224 * 1000) / 1000, if(prop("Unit") == "lb", round(prop("Amount") * 16 * 1000) / 1000, if(prop("Unit") == "oz", prop("Amount"), 0))))
Full lb
Copy  •  js
if(prop("Unit") == "kg", floor(prop("Amount") * 2.205), toNumber(""))
Remaining oz
Copy  •  js
if(prop("Unit") == "kg", floor(prop("Amount") * 2.205 * 10 / 10 % 1 * 16), toNumber(""))
lb + oz
Copy  •  js
if(prop("Unit") == "kg", format(floor(prop("Amount") * 2.205)) + "lb " + format(floor(prop("Amount") * 2.205 * 10 / 10 % 1 * 16)) + "oz", "")
Previous & Next