Calculate the range of a number set