Understanding the percentile calculator — concept and principle
This calculator answers two opposite questions. "Value at percentile" finds the number below which a given percentage of the data lies (for example, the 90th percentile). "Percentile rank" goes the other way: given a value, what percentage of the data lies below it? Both are used for test scores, growth charts and service-level targets.
How it is calculated
- Value at percentile P: sort the n values, compute the position h = (n − 1) × P/100 + 1, and interpolate linearly between the two neighbouring values (the Excel PERCENTILE.INC / R type 7 method).
- Percentile rank of x: PR = (number of values below x + ½ × number of values equal to x) ÷ n × 100.
Counting half of the tied values places x in the middle of its own group.
The principle
A percentile is a position, not an amount. Interpolation treats the sorted data as points on a smooth, increasing curve, so a percentile that falls between two observations takes a proportional share of the gap. The percentile rank formula is the empirical cumulative distribution evaluated at x with a "mid-point" correction for ties. The two calculations are close inverses, but not exact ones, because one interpolates while the other counts discrete values.
Worked example
- Data: 12, 15, 11, 19, 22, 15, 18, 25, 14, 16. Sorted: 11, 12, 14, 15, 15, 16, 18, 19, 22, 25 (n = 10).
- 90th percentile: h = 9 × 0.90 + 1 = 9.1, which lies between the 9th value (22) and the 10th value (25).
- Value = 22 + 0.1 × (25 − 22) = 22.3.
- Percentile rank of 18: six values are below 18 (11, 12, 14, 15, 15, 16) and one equals 18.
- PR = (6 + 0.5 × 1) ÷ 10 × 100 = 65%.
How to read the result
A percentile rank of 65% means the value is higher than about 65% of the data set. It does not mean a score of 65% correct. The 50th percentile is the median; the 25th and 75th are the quartiles. In small data sets each value moves the rank by 100/n points (10 points here), so differences of a few percentile points are not meaningful.
Common mistakes
- Confusing a percentile rank with a percentage score.
- Comparing percentiles computed with different definitions (exclusive vs inclusive, nearest-rank vs interpolation).
- Treating the gap between the 50th and 60th percentile as equal in size to the gap between the 90th and 99th; percentile scales are not linear in the underlying values.
Frequently asked questions
What is the difference between a percentile and a percentage?
A percentage measures a share of a total (score out of 100); a percentile describes a position relative to other people or values in the same data.
Can a percentile be a value that is not in the data?
Yes. With interpolation the 90th percentile here is 22.3, which no one actually recorded.
Why do some tools report the percentile rank of 18 as 60% or 70%?
They count only values strictly below (60%) or values at or below (70%). The mid-point method used here splits the difference.
Sources: Hyndman, R. J. & Fan, Y. (1996). Sample quantiles in statistical packages. The American Statistician, 50(4), 361–365. · Microsoft Support, PERCENTILE.INC function documentation.