RANK.AVG Function

Excel Functions › Statistical

Excel 2010+ Statistical

The Excel RANK.AVG function returns the rank of a number within a list. When several values tie, RANK.AVG gives each of them the average of the ranks they would otherwise occupy.


Quick answer:
=RANK.AVG(5,{8,5,5,2,1}) 5 ties for 2nd/3rd, so rank = 2.5

Syntax

=RANK.AVG(number, ref, [order])
ArgumentDescription
numberRequiredThe value whose rank you want to find.
refRequiredThe array or range of numbers to rank against. Non-numeric values are ignored.
orderOptional0 or omitted = descending (largest is rank 1); any non-zero value = ascending (smallest is rank 1).

How to use it

RANK.AVG works exactly like the older RANK function, except in how it treats ties. By default it ranks in descending order — the largest number is rank 1.

=RANK.AVG(8,{8,5,5,2,1}) // largest = rank 1
=RANK.AVG(5,{8,5,5,2,1}) // two 5s tie for 2nd/3rd = 2.5

The two 5s would occupy ranks 2 and 3. RANK.AVG averages those positions, so both report 2.5. Pass a non-zero order to rank ascending instead:

=RANK.AVG(5,{8,5,5,2,1},1) // ascending = 3.5

RANK.AVG vs RANK.EQ: use RANK.AVG when ties should share an averaged position (fairer for percentiles and scoring); use RANK.EQ when ties should all get the same top rank.

Try it: interactive demo

Live demo

Pick a RANK.AVG example to see the formula and its result.

Result:

Practice workbook

📊
Download the free RANK.AVG practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

How does RANK.AVG handle ties?
Tied values receive the average of the ranks they would otherwise take. If two values would occupy ranks 2 and 3, both report 2.5.
What is the difference between RANK.AVG and RANK.EQ?
RANK.AVG averages tied ranks (giving fractional ranks like 2.5); RANK.EQ gives every tied value the same top rank (both would be 2). RANK.AVG was added in Excel 2010 alongside RANK.EQ.
How do I rank smallest-to-largest?
Supply a non-zero third argument: =RANK.AVG(number, ref, 1) ranks in ascending order so the smallest value is rank 1.
Does the old RANK function still work?
Yes. RANK is kept in the Compatibility category for backward compatibility and behaves like RANK.EQ. New workbooks should use RANK.EQ or RANK.AVG.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: RANK.EQ · LARGE · SMALL · PERCENTRANK.INC · MEDIAN