Formula for calculating percentile