Calculating the percentage within a range