RANK.AVG function
Returns the rank of a number in a list; tied values receive the average of the ranks they would occupy.
Available in Excel 2010 and later, Microsoft 365, Excel for the web, Excel for Mac 2011 and later
Excel 2010 and laterWorks in Google Sheets
Syntax
RANK.AVG(number, ref, [order])| Argument | What it means | |
|---|---|---|
number | Required | The value to rank. |
ref | Required | The list of numbers to rank against (non-numeric values are ignored). |
order | Optional | 0 or omitted: largest value is rank 1 (descending). Any non-zero value: smallest value is rank 1 (ascending). |
Returns: The rank, possibly with .5 for ties.
How RANK.AVG works
When two values tie, there are two common ways to rank them. Sports tables give both the same top rank (1, 1, 3), which is what RANK.EQ does. Statisticians give each the average of the positions they share: two items tied for 1st and 2nd both get 1.5. RANK.AVG uses the averaging method, which keeps the sum of all ranks the same as without ties.
This matters for rank-based statistical tests (such as the Mann-Whitney or Spearman correlation, which you can build from ranks in Excel) and for fair scoring schemes. Use absolute references for ref (e.g. $B$2:$B$7) when you copy the formula down.
Examples
1Tied reps share the average rank
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Sales | |
| 2 | Ana | 840 | |
| 3 | Ben | 920 | 1.5 |
| 4 | Chloe | 760 | |
| 5 | Dev | 920 | |
| 6 | Eva | 880 | |
| 7 | Finn | 760 |
Result: 1.5
Ben and Dev both sold 920, the highest. They occupy ranks 1 and 2, so each gets (1 + 2) / 2 = 1.5. Eva is next at rank 3.
2A tie further down
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Sales | |
| 2 | Ana | 840 | |
| 3 | Ben | 920 | |
| 4 | Chloe | 760 | 5.5 |
| 5 | Dev | 920 | |
| 6 | Eva | 880 | |
| 7 | Finn | 760 |
Result: 5.5
Chloe and Finn tie at 760, the lowest, sharing ranks 5 and 6: (5 + 6) / 2 = 5.5. RANK.EQ would give both 5.
3Ascending order
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Sales | |
| 2 | Ana | 840 | |
| 3 | Ben | 920 | |
| 4 | Chloe | 760 | 1.5 |
| 5 | Dev | 920 | |
| 6 | Eva | 880 | |
| 7 | Finn | 760 |
Result: 1.5
With order 1 the smallest value ranks first. Chloe and Finn share ranks 1 and 2, so each gets 1.5.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#N/A | number does not appear in ref. | Rank a value that exists in the list (watch for rounding differences). |
#VALUE! | An argument is of the wrong type. | ref must be a range or array of numbers. |
Tips
- Spearman rank correlation: rank both columns with RANK.AVG, then use CORREL on the ranks.
- Numbers that look equal but differ in tiny decimals are not ties; round them first if needed.
Google Sheets
RANK.AVG also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
RANK.AVG in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | PLADS.GNSN |
| Dutch | RANG.GEMIDDELDE |
| Finnish | ARVON.MUKAAN.KESKIARVO |
| French | MOYENNE.RANG |
| German | RANG.MITTELW |
| Hungarian | RANG.ÁTL |
| Italian | RANGO.MEDIA |
| Norwegian (Bokmål) | RANG.GJSN |
| Polish | POZYCJA.ŚR |
| Portuguese (Brazil) | ORDEM.MÉD |
| Portuguese (Portugal) | ORDEM.MÉD |
| Russian | РАНГ.СР |
| Spanish | JERARQUIA.MEDIA |
| Swedish | RANG.MED |
| Turkish | RANK.ORT |