convertPercentToNumber function.