Why do Excel, SPSS and a textbook give different 90th percentiles? Paste your numbers to get a percentile or a percentile rank by all three methods, with the Excel figures and #NUM! cases.
Percentile Calculator - Value, Rank, Excel INC and EXC
Why do Excel, SPSS and a textbook give different 90th percentiles? Paste your numbers to get a percentile or a percentile rank by all three methods, with the Excel figures and #NUM! cases.
Parameters
Enter data for calculations
💡 Fill in all required fields to unlock the calculate button
One list, one percentile, three different answers
Ask three programs for the 90th percentile of the same twelve delivery times, 18, 21, 22, 24, 25, 27, 28, 30, 33, 35, 41 and 52 minutes, and you can get 40.4, 48.7 and 41.0. None of them is a bug. Percentiles have several accepted definitions, and this calculator shows the three you are most likely to meet side by side: linear interpolation (Excel PERCENTILE.INC, Google Sheets, R and NumPy), exclusive interpolation (Excel PERCENTILE.EXC, Minitab, SPSS) and nearest rank. It works in both directions, from a percentile to a value and from a value to its percentile rank, and it prints the matching Excel figures, including the cases where Excel answers #NUM! or #N/A.
Seven fields, one of them a direction switch
- Data - numbers separated by spaces, commas, semicolons or new lines, or a column pasted from a spreadsheet. Use a dot for decimals and leave out thousands separators: the tool refuses "1,000 2,000" rather than reading it as 1 and 2.
- What to find - the value at a percentile you choose, or the percentile rank of a value you already have, such as your own score.
- Percentile - any number from 0 to 100, decimals allowed. 50 is the median, 25 and 75 are the quartiles, 90 marks the top tenth.
- Method - linear interpolation unless you need to match a specific program or rule. The other two are always shown in the comparison table anyway.
- Value - used only for percentile rank. It does not have to appear in the list.
- Decimal places - optional. Left empty, the tool follows the most precise number you typed, and very small measurements switch to scientific notation instead of collapsing to 0.0000.
- Name of the data - optional, printed above the result so a screenshot keeps its context.
Percentile, percentile rank, quartile: two questions under three names
A percentile is a value. The 90th percentile of the delivery times is a number of minutes, about 40, below which roughly nine tenths of the deliveries fall. A percentile rank goes the other way: it starts from a value and tells you what share of the list sits below it. A delivery of 30 minutes has a percentile rank of 62.5 in that list. The two are inverses of each other, which is why the calculator has one switch for the direction rather than two separate tools.
Quartiles, deciles and the median are simply percentiles with their own names. The first quartile is P25, the median P50, the third quartile P75, and the ninth decile P90. Whatever a program calls them, it computes them with one of the definitions below, and that choice decides the digits you see.
None of this is the same as a percentage. A score of 80% on a test says how many questions were right; the 80th percentile says how the score compares with everyone else who sat the test. A result of 55% can be at the 90th percentile of a hard exam.
An atlas of percentile definitions
Statisticians Rob Hyndman and Yanan Fan listed nine sample quantile definitions in a paper in The American Statistician, and R still numbers them type 1 to type 9. Most software you will touch uses one of three. Write n for the number of values and p for the percentile as a fraction, so 0.9 for P90.
| Definition | Position in the sorted list | Where you meet it | Always one of your values? | Works for every p? |
|---|---|---|---|---|
| Linear interpolation (R type 7) | 1 + (n - 1)p | Excel PERCENTILE.INC and PERCENTILE, Google Sheets PERCENTILE, R default, NumPy default | No | Yes, 0 to 100 |
| Exclusive interpolation (R type 6) | (n + 1)p | Excel PERCENTILE.EXC, Minitab, SPSS | No | Only from 1/(n + 1) to n/(n + 1) |
| Nearest rank | ceil(p × n), no interpolation | Textbooks, grading and pay rules, NumPy method "inverted_cdf" | Yes | Yes |
| Rule of thumb | To match a spreadsheet, use linear interpolation. To match SPSS or Minitab output, use exclusive. When the answer must be a value that actually occurred, use nearest rank. | |||
A fractional position means "part of the way between two neighbors". For P30 of 1, 2, 3 and 4, linear interpolation lands at position 1 + 3 × 0.3 = 1.9, which is nine tenths of the way from the first value to the second, so the answer is 1.9. That is the example in Microsoft's help page for PERCENTILE.INC, and the calculator returns the same figure.
Twelve delivery times, every method at five percentiles
The same list as above, sorted: 18, 21, 22, 24, 25, 27, 28, 30, 33, 35, 41 and 52 minutes. Each cell is what the calculator returns with the method in the column header.
| Percentile | Linear interpolation | Exclusive | Nearest rank |
|---|---|---|---|
| P10 | 21.1 | 18.9 | 21.0 |
| P25, first quartile | 23.5 | 22.5 | 22.0 |
| P50, median | 27.5 | 27.5 | 27.0 |
| P75, third quartile | 33.5 | 34.5 | 33.0 |
| P90 | 40.4 | 48.7 | 41.0 |
| Reading | Near the median the methods differ by half a minute; at P90 by 8.3 minutes, because the last gap in the list, 41 to 52, is the widest. | ||
P95 shows the limit of the exclusive method. With 12 values it is defined only between the 7.7th and the 92.3rd percentile, so Excel's PERCENTILE.EXC returns #NUM! for P95 while PERCENTILE.INC gives 46.0. The calculator marks the exclusive row "(Excel: #NUM!)" and, if you picked that method, says that its figure has been clipped to the largest value, 52.
Patterns that hold for any list
Percentile rank and the trouble with ties
For a value that appears once, the counting is simple. 30 minutes has 7 deliveries below it, 1 equal and 4 above, so "strictly below" gives 58.3, "at or below" gives 66.7, and the middle rule, below plus half of the ties, gives 62.5. Excel's PERCENTRANK.INC reports 0.636 (7 of the 11 other values) and PERCENTRANK.EXC 0.615 ((7 + 1) / 13).
Ties widen the gap between the rules. In 10, 20, 30, 30, 30, 40, 50, 60 the value 30 has 2 values below and 3 equal to it, so its rank is 25.0, 43.8 or 62.5 depending on the rule. The usual formula for test norms takes the middle one, which is why the calculator puts it in the headline and shows the other two underneath. A value outside the list gets 0 or 100 however far away it is, and Excel returns #N/A for it; the calculator says so rather than printing a number that looks precise.
Where percentiles show up, and which definition they use
| Setting | What the percentile describes | Can you recompute it here? |
|---|---|---|
| Your own spreadsheet column | Position inside your data | Yes, with linear interpolation for PERCENTILE.INC |
| Standardized test score report | Position in a reference group chosen by the test maker | No, the reference scores are not public |
| Child growth charts | Position against CDC or WHO reference curves for the same age and sex | No, use a growth-chart tool |
| Website response times (P95, P99) | The slow tail of your own measurements | Yes, once you know which method the monitoring tool uses |
| Salary surveys | Pay at a given share of the surveyed jobs | Only with the raw survey data |
The pattern is simple: if you have the numbers, this tool reproduces the percentile; if the percentile compares you with someone else's population, the answer depends on data you do not hold.
Percentile questions, answered briefly
Related tools
Coefficient of Variation Calculator
Relative spread of a list, from raw numbers or a mean and standard deviation - See calculator
Interquartile Range Calculator
Quartiles, the IQR, outlier fences and a box plot - See calculator
Median Calculator
The middle value of a sorted list, the 50th percentile - See calculator
Mode Calculator
The most frequent value, bimodal lists and lists with no mode - See calculator
Standard Deviation Calculator
How far values spread around the mean - See calculator
Average Calculator
Arithmetic, weighted, geometric and harmonic means - See calculator
Child Weight Percentile Calculator
A child's weight against reference growth curves - See calculator
Wilcoxon Test Calculator
Compares two groups by ranks instead of means - See calculator