Example 1
Tied values get the average rank
C3 =RANK.AVG(B3,$B$2:$B$6)
Result: 3.5
The two 85s occupy third and fourth place, so each gets the average, 3.5.
C3 =RANK.AVG(B3,$B$2:$B$6) returns 3.5
Returns the rank of a number within a list, giving tied values the average of the ranks they share, such as 2.5.
Syntax
=RANK.AVG(, , )
Excel 2010 and later, including Excel for Microsoft 365 and Excel for the web. There is no older equivalent.
Try it
Edit the formula in C3 or change the inputs. The sheet recalculates as you type.
C3 =RANK.AVG(B3,$B$2:$B$6) returns 3.5
RANK.AVG ranks a value within a list and handles ties fairly. Where RANK.EQ gives tied values the top rank of the group, RANK.AVG gives each of them the average of the ranks they occupy.
Take quiz scores of 95, 90, 85, 85 and 70, ranked from the highest down. The two 85s share third and fourth place.
RANK.AVG gives both 85s a rank of 3.5, the average of 3 and 4. With no ties, RANK.AVG and RANK.EQ return the same whole numbers.
Average ranks keep the ranks adding up. The ranks of five items always total 15, whether there are ties or not. That matters in rank-based statistics, such as Spearman's rank correlation and the Wilcoxon and Kruskal-Wallis tests, which all assume tied values get average ranks. For a league table, most people prefer RANK.EQ, because "joint 3rd" reads more naturally than "3.5th".
number is the value to rank. It must appear in ref.ref is the list. Lock it with $ when filling down, as in $B$2:$B$6. Text and blanks in the list are ignored.order is optional. Omitted or 0 means the largest value is rank 1. Any other number ranks from the smallest up.#N/A is returned if number is not in the list, which can happen when a value is typed rather than referenced, or stored as text.
RANK.AVG arrived in Excel 2010 and has no older equivalent, so a workbook that uses it will not calculate in Excel 2007 or earlier. If a file must work there, use RANK, which behaves like RANK.EQ, or build the average rank with COUNTIF: =RANK(B2,$B$2:$B$6)+(COUNTIF($B$2:$B$6,B2)-1)/2.
B2. It must appear in ref, or the result is #N/A.$B$2:$B$6. Lock it with dollar signs when you fill the formula down. Text and blanks are ignored.0 or omitted ranks from the largest down, so the biggest value is 1. Any other number, such as 1, ranks from the smallest up.Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
C3 =RANK.AVG(B3,$B$2:$B$6)
Result: 3.5
The two 85s occupy third and fourth place, so each gets the average, 3.5.
C3 =RANK.AVG(B3,$B$2:$B$6) returns 3.5
Example 2
C2 =RANK.AVG(B2,$B$2:$B$6)
Result: 2
Only 95 beats 90, so the rank is 2, exactly what RANK.EQ would return.
C2 =RANK.AVG(B2,$B$2:$B$6) returns 2
Example 3
C3 =RANK.AVG(B3,$B$2:$B$6,1)
Result: 2.5
Ranked from the bottom, 70 is first, and the two 85s share second and third, so each is 2.5.
C3 =RANK.AVG(B3,$B$2:$B$6,1) returns 2.5
Example 4
C3 =RANK.EQ(B3,$B$2:$B$6)
Result: 3
For the same 85, RANK.EQ returns 3 where RANK.AVG returns 3.5.
C3 =RANK.EQ(B3,$B$2:$B$6) returns 3
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In C2, rank each score so that tied scores share the average of their ranks, with the highest score ranked 1. Fill down to C7.
Answer in C2, then it fills down to C7.
$ on the list. RANK.AVG(B2,B2:B6) filled down slides the range and gives wrong ranks. Write $B$2:$B$6.#N/A means the number is not in the list. Use cell references rather than typed numbers, and check for text numbers.order argument is easy to flip. Omitted or 0 puts the largest first; any other number puts the smallest first.Use RANK.AVG when the ranks feed a rank-based statistic, or when tied rows must share the ranks fairly. Use RANK.EQ for league tables, where "joint third" is the natural way to show a tie.
Two or more values are tied. They share the positions they occupy, so the average of 3 and 4 is 3.5.
No. RANK.AVG was introduced in Excel 2010. The older RANK function behaves like RANK.EQ.
Set the third argument to 1: `=RANK.AVG(B2,$B$2:$B$6,1)`.
RANK.AVG is taught in Data analysis with formulas, lesson 17: RANK and ranking within groups. Each lesson is a short, graded exercise like the one above.