Calculates dimensional weight.