Percentile Calculator
Enter up to ten numbers, a percentile, and a value to rank. You get the value at that percentile and the percentile rank of your value, both with linear interpolation (the Excel PERCENTILE.INC and PERCENTRANK.INC method).
Updated
Report a problem
Method
This calculator uses linear interpolation, the same as Excel PERCENTILE.INC and PERCENTRANK.INC (R type 7). The data are sorted, and ranks are counted from 0 to n - 1.
Formula
- Value at percentile p:
rank = p ÷ 100 × (n - 1),i = floor(rank),value = x[i] + (rank - i) × (x[i+1] - x[i]) - Percentile rank of a value v between
x[j]andx[j+1]:((j + (v - x[j]) ÷ (x[j+1] - x[j])) ÷ (n - 1)) × 100. If v equals a data value,jis its first position.
The value to rank must lie between the minimum and maximum of your numbers.
Worked example
Numbers 15, 20, 35, 40, 50 (n = 5).
- 90th percentile: rank = 0.9 × 4 = 3.6, so value = 40 + 0.6 × 10 = 46
- 25th percentile: rank = 1, value = 20
- Percentile rank of 35: position 2 of 4, so 50%
- Percentile rank of 27.5: between 20 (position 1) and 35 (position 2),
(1 + 7.5 ÷ 15) ÷ 4= 37.5%
Frequently asked questions
How is the value at a percentile calculated?
Sort the numbers, then find rank = p ÷ 100 × (n - 1), counting from 0. If the rank falls between two numbers, interpolate linearly. For 15, 20, 35, 40, 50 and p = 90, rank = 0.9 × 4 = 3.6, so the value is 40 + 0.6 × (50 - 40) = 46.
How is percentile rank calculated?
The rank of a value is its position in the sorted data divided by n - 1, with interpolation between neighbours. In 15, 20, 35, 40, 50 the value 35 is at position 2 of 4, so its rank is 50%. The value 27.5 lies halfway between 20 and 35, so its rank is (1 + 0.5) ÷ 4 = 37.5%.
Why does my answer differ from another percentile calculator?
There are several accepted definitions. This page uses the inclusive linear method (Excel PERCENTILE.INC, R type 7). Exclusive methods such as PERCENTILE.EXC or nearest-rank give different values for small data sets.
What happens with repeated values?
The value at a percentile is unaffected. For percentile rank, a repeated value takes the rank of its first occurrence, so in 3, 3, 3, 10 the value 3 has rank 0%.
Why is the rank of my value shown as a dash?
The inclusive method only ranks values from the minimum to the maximum of your numbers. A value below the smallest or above the largest is outside the data, so no rank can be given and a dash (-) is shown instead. The value at your chosen percentile is still calculated normally.