Percentile Calculator
Find any percentile of a data set by the method you need, from raw or grouped data, or a value's percentile rank, with the working and a box plot.
10 numbers
Separate numbers with commas, spaces or new lines. A comma always separates, so write 1234, not 1,234.
One or more from 0 to 100, such as 90 or 25, 50, 75.
86.6
- Smallest
- 56
- First quartile (Q1)
- 65
- Median
- 71.5
- Third quartile (Q3)
- 79.25
- Largest
- 92
- Interquartile range
- 14.25
- Outliers
- None
Working
Find the 90th percentile, the quartiles or any other percentile of a data set, by the definition your spreadsheet, course or calculator uses. The working shows the rank and the interpolation in your own numbers, and a box plot shows where the percentile sits in the data.
The same page gives a value's percentile rank (the share of the data below it), and percentiles of grouped data from class intervals and frequencies, by the formula taught in school statistics.
How to use it
Percentile takes the numbers, separated by commas, spaces or new lines (up to 100,000), and one or more percentiles from 0 to 100, up to 100 at once. Percentiles can be typed as 90, 90th, P90 or 2.5; Quartiles and Deciles fill the field in one click. Method chooses the definition, and with it the quartiles of the box plot and the summary.
Percentile rank takes the numbers and a value, which need not be one of them, and marks the value on the box plot. Grouped data takes each class as two limits (10-20, 10 to 20) with its frequency; two columns pasted from a spreadsheet fill the rows. It draws the cumulative frequency curve (the ogive), and for a single percentile shows the reading off it: across from p × N ÷ 100 to the curve, then down to the percentile.
Results with digits after the point start at two decimal places, marked ≈ when rounded; Auto shows up to ten significant figures. The mode, the method and the places are remembered on this device. Everything runs in your browser.
The definitions
Every method sorts the data, finds a rank r for the percentile p, and reads the value at that rank. When r falls between two ranks k and k + 1, the value is interpolated: the k-th value plus the fraction of r past k times the gap to the next value. The methods differ only in where they put r, so they agree on large data sets and differ most on small ones. Hyndman and Fan (1996) compared nine such definitions; the numbers below are theirs.
- Inclusive (Excel PERCENTILE.INC) — r = p × (n − 1) + 1, so the 0th percentile is the smallest value and the 100th the largest. Type 7, also the default in Google Sheets, R and NumPy.
- Exclusive (Excel PERCENTILE.EXC) — r = p × (n + 1). It needs 1 ≤ r ≤ n, so it covers percentiles from 100 ÷ (n + 1) to 100n ÷ (n + 1) only; Excel returns #NUM! outside them, and the tool names the range. Type 6, also used by Minitab and SPSS.
- Nearest rank — r = ⌈p × n⌉, the smallest rank that covers p of the data, with no interpolation, so the answer is always one of the values. The 0th percentile is the first value by convention.
- Midpoint (Hazen) — r = p × n + 0.5, taking each value to stand at the middle of its share of the data. Below rank 1 it gives the smallest value, above n the largest. Type 5.
- Median of halves and Tukey's hinges give only the quartiles: Q1 and Q3 are the medians of the lower and upper halves. Median of halves, used by TI-84 calculators and many textbooks, leaves the middle value of an odd count out of both halves; Tukey's hinges keep it in both. They match the quartiles of the Standard Deviation Calculator, as do the inclusive and exclusive methods.
The box plot draws the box from Q1 to Q3 by the chosen method, the median across it, and whiskers to the furthest values within 1.5 times the interquartile range of the box; values beyond are outliers, drawn as dots.
Inclusive: r = p × (n − 1) + 1
Exclusive: r = p × (n + 1), for 1 ≤ r ≤ n
Nearest rank: r = ⌈p × n⌉
Midpoint: r = p × n + 0.5
Between ranks k and k + 1: P = xₖ + (r − k) × (xₖ₊₁ − xₖ)
Percentile rank = (below + ½ × equal) ÷ n × 100
Grouped data: P = L + (p × N ÷ 100 − cf) ÷ f × h
Examples
The 90th percentile of ten test scores, by each method
For the scores 56, 61, 64, 68, 70, 73, 77, 80, 86, 92 and the percentile 90, the four methods that cover every percentile give:
- Inclusive (Excel PERCENTILE.INC): 86.6 — rank r = 0.9 × (10 − 1) + 1 = 9.1, between the 9th value and the 10th.
- Exclusive (Excel PERCENTILE.EXC): 91.4 — rank r = 0.9 × (10 + 1) = 9.9, between the 9th value and the 10th.
- Nearest rank: 86 — rank r = ⌈0.9 × 10⌉ = 9, the 9th value.
- Midpoint (Hazen): 89 — rank r = 0.9 × 10 + 0.5 = 9.5, between the 9th value and the 10th.
They differ because ten values leave wide gaps near the top, and each method places the 90th percentile at a different point in the last gap. The inclusive method's working:
- Sort the 10 numbers from smallest to largest. 56, 61, 64, 68, 70, 73, 77, 80, 86, 92
- 90th percentile: rank r = 0.9 × (10 − 1) + 1 = 9.1, between the 9th value and the 10th. P90 = 86 + 0.1 × (92 − 86) = 86.6
The median and 90th percentile of grouped data
- Classes
- 0-10, 10-20, 20-30, 30-40, 40-50
- Frequencies
- 5, 8, 12, 10, 5
- Percentiles
- 50, 90
The 50th percentile, the median, is ≈ 25.83 and the 90th is 42. Each is found in the first class whose cumulative frequency reaches p × N ÷ 100, and placed within it as if its values were spread evenly across the class:
- Add the frequencies. N = 5 + 8 + 12 + 10 + 5 = 40
- Add the frequencies class by class, for the cumulative frequency at the end of each. 0–10: 5, 10–20: 13, 20–30: 25, 30–40: 35, 40–50: 40
- Each percentile lies in the first class whose cumulative frequency reaches p × N ÷ 100. L is that class's lower boundary, cf the cumulative frequency before it, f its frequency and h its width: P = L + (p × N ÷ 100 − cf) ÷ f × h
- 50th percentile: p × N ÷ 100 = 50 × 40 ÷ 100 = 20, first reached in the class 20–30, so L = 20, cf = 13, f = 12 and h = 10. P50 = 20 + (20 − 13) ÷ 12 × 10 ≈ 25.83
- 90th percentile: p × N ÷ 100 = 90 × 40 ÷ 100 = 36, first reached in the class 40–50, so L = 40, cf = 35, f = 5 and h = 10. P90 = 40 + (36 − 35) ÷ 5 × 10 = 42
The percentile rank of a score
Among the same ten scores, 72 has a percentile rank of 50. The scores below it are 5 of 10, 50%, and 0 equal it. A score of 77, which is in the data, ranks 65: below it are 6 of 10, 60%, and half of the 1 equal to it count too.
Sources
The inclusive and exclusive methods follow Excel's PERCENTILE.INC and PERCENTILE.EXC as Microsoft documents them, including the range PERCENTILE.EXC accepts. The type numbers are those of Hyndman and Fan.
Sources
- PERCENTILE.INC function — Microsoft
- PERCENTILE.EXC function — Microsoft
- Sample Quantiles in Statistical Packages (Hyndman and Fan, 1996) — The American Statistician
Reviewed
Frequently asked questions
See also
- Standard Deviation Calculator — for the spread of the same data, with its quartiles by the same methods.
- JEE Main Percentile Calculator — for an exam percentile by NTA's formula, and the rank it points to.
- Z-Score Calculator — for the percentile of a value in a normal distribution, from its mean and standard deviation.