The formula
volume = length × width × height
dim weight = volume ÷ divisor
billable = roundUp( max( dim weight, scale weight ) )
Inches with a divisor of 139 or 166 return pounds. Centimetres with a divisor of 5000 or 6000 return kilograms. Girth is twice the width plus twice the height, measured around the parcel perpendicular to its longest side.