calculate the percentage of a number