calculate numeric scale