Statistical function

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])
ArgumentWhat it means
numberRequiredThe value to rank.
refRequiredThe list of numbers to rank against (non-numeric values are ignored).
orderOptional0 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

C3fx=RANK.AVG(B3, $B$2:$B$7)
ABC
1RepSales
2Ana840
3Ben9201.5
4Chloe760
5Dev920
6Eva880
7Finn760

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

C4fx=RANK.AVG(B4, $B$2:$B$7)
ABC
1RepSales
2Ana840
3Ben920
4Chloe7605.5
5Dev920
6Eva880
7Finn760

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

C4fx=RANK.AVG(B4, $B$2:$B$7, 1)
ABC
1RepSales
2Ana840
3Ben920
4Chloe7601.5
5Dev920
6Eva880
7Finn760

Result: 1.5

With order 1 the smallest value ranks first. Chloe and Finn share ranks 1 and 2, so each gets 1.5.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#N/Anumber 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.

LanguageFunction name
DanishPLADS.GNSN
DutchRANG.GEMIDDELDE
FinnishARVON.MUKAAN.KESKIARVO
FrenchMOYENNE.RANG
GermanRANG.MITTELW
HungarianRANG.ÁTL
ItalianRANGO.MEDIA
Norwegian (Bokmål)RANG.GJSN
PolishPOZYCJA.ŚR
Portuguese (Brazil)ORDEM.MÉD
Portuguese (Portugal)ORDEM.MÉD
RussianРАНГ.СР
SpanishJERARQUIA.MEDIA
SwedishRANG.MED
TurkishRANK.ORT

Recipes that use RANK.AVG