Confident CellsExcel practice Start free

Rank in Excel, and find the top 5

Updated 26 November 2026 · 5 min read

=RANK(B2,$B$2:$B$13) gives the score in B2 its place in the list: 1 for the highest. For the top 5 scores themselves, use =LARGE($B$2:$B$13,1), then 2, 3, 4 and 5, and INDEX with MATCH to put the name beside each one. RANK, LARGE and SMALL work in every version of Excel, on Windows and Mac and in Excel for the web.

Ranking at a glance

You wantFormulaNotes
A rank, highest first=RANK(B2,$B$2:$B$13)Lock the list with $
A rank, lowest first=RANK(B2,$B$2:$B$7,1)For times, where lowest is best
A rank with no ties=RANK(B2,$B$2:$B$7)+COUNTIF($B$2:B2,B2)-1The first one listed goes higher
A rank within each group=COUNTIFS($B$2:$B$9,B2,$C$2:$C$9,">"&C2)+1Such as a rank in each region
The 3rd highest score=LARGE($B$2:$B$13,3)SMALL gives the 3rd lowest
The name beside a top score=INDEX($A$2:$A$13,MATCH(E2,$B$2:$B$13,0))Ties show the first name twice
The top 5 rows in one go=TAKE(SORT(A2:B13,2,-1),5)Excel 365 and 2024

Each one is worked through below.

A worked example: RANK

Twelve people took a quiz, with their scores in column B. Nia scored 91, which is higher than everyone else, so Nia is 1st. Priya's 88 is beaten only by Nia's 91, so Priya is 2nd. RANK counts how many scores are higher and adds 1. Ollie's 45 is beaten by all 11 others, so Ollie is 12th.

=RANK(B2,$B$2:$B$13)
ABC
1NameScoreRank
2Grace678
3Tom5411
4Priya882
5Marek726
6Nia911
7Ollie4512
8Amira795
9Ben639
10Cara853
11Dev5810
12Ewa707
13Finn824
C2 holds =RANK(B2,$B$2:$B$13), copied down to C13. Nia, in row 6, is 1st.

To add the $ signs, click on B2:B13 in the formula and press F4 (on a Mac, Cmd+T, or Fn+F4 on some keyboards). RANK.EQ is the same function under its newer name, and gives the same answers.

Lowest first: times and costs

In a race, the lowest time wins. Add a 1 on the end of RANK to give the lowest number 1st. Jo's 21.8 minutes is the fastest, so Jo is 1st; Sam's 27.3 is the slowest of six, so 6th.

ABC
1RunnerMinutesPlace
2Ali24.54
3Bea22.12
4Sam27.36
5Jo21.81
6Kit255
7Lee23.43
C2 holds =RANK(B2,$B$2:$B$7,1), copied down. The 1 on the end ranks the lowest time 1st.

Leave the last part off (or put 0) for highest first. The same goes for anything where less is better: costs, days absent, mistakes.

Ties

In this shorter list, Lola and Cara both scored 85. Two scores are higher (Nia's 91 and Priya's 88), so RANK gives them both 3rd, and nobody is 4th. That's how most results tables show a tie. RANK.AVG shares the places out instead: they would be 3rd and 4th, so each gets 3.5.

ABCDE
1NameScoreRANKRANK.AVGNo ties
2Nia91111
3Priya88222
4Lola8533.53
5Cara8533.54
6Finn82555
7Marek72666
C2 holds =RANK(B2,$B$2:$B$7), D2 =RANK.AVG(B2,$B$2:$B$7) and E2 =RANK(B2,$B$2:$B$7)+COUNTIF($B$2:B2,B2)-1, all copied down.

When every place must be different, such as for a numbered list, column E adds a tie-break. COUNTIF($B$2:B2,B2) counts how many times this score has come up so far. Only the start of that range is locked, so it grows as the formula goes down. For Lola it's 1, so Lola stays 3rd. For Cara it's 2, so Cara moves to 4th.

The top 5: LARGE

LARGE gives the biggest number in a list, or the 2nd biggest, the 3rd, and so on. Put 1 to 5 in a column and point LARGE at each:

=LARGE($B$2:$B$13,D2)

To show whose score it is, MATCH finds which row has that score and INDEX brings back the name from the same row (see INDEX and MATCH):

=INDEX($A$2:$A$13,MATCH(E2,$B$2:$B$13,0))
ABCDEF
1NameScorePlaceScoreName
2Grace67191Nia
3Tom54288Priya
4Priya88385Cara
5Marek72482Finn
6Nia91579Amira
7Ollie45
8Amira79
9Ben63
10Cara85
11Dev58
12Ewa70
13Finn82
E2 holds =LARGE($B$2:$B$13,D2) and F2 holds =INDEX($A$2:$A$13,MATCH(E2,$B$2:$B$13,0)), both copied down.

The bottom 5 work the same way with SMALL: =SMALL($B$2:$B$13,1) is the lowest score, 45. If two people tie, LARGE gives their score twice, but MATCH always finds the first person with that score, so the first name shows twice. The next way keeps both names.

The top 5 in one go (Excel 365)

In Excel 365 and Excel 2024, sort the whole table by score, biggest first, and keep the first 5 rows. One formula spills the names and scores together, and tied people each keep their own name:

=TAKE(SORT(A2:B13,2,-1),5)
ABCDE
1NameScoreTop 5
2Grace67Nia91
3Tom54Priya88
4Priya88Cara85
5Marek72Finn82
6Nia91Amira79
7Ollie45
8Amira79
9Ben63
10Cara85
11Dev58
12Ewa70
13Finn82
D2 holds =TAKE(SORT(A2:B13,2,-1),5), which spills into D2:E6.

The 2 means sort by the 2nd column, and -1 means biggest first. See SORT and SORTBY and TAKE. To keep everyone who ties with 5th place, filter instead: =SORT(FILTER(A2:B13,B2:B13>=LARGE(B2:B13,5)),2,-1).

A rank within each group

To rank people within their own region, count how many people in the same region scored higher, and add 1. In the North, only Nia (91) and Cara (85) beat Finn's 82, so Finn is 3rd in the North, even though Ben, in the South, scored less than Finn and is 1st there.

=COUNTIFS($B$2:$B$9,B2,$C$2:$C$9,">"&C2)+1
ABCD
1NameRegionScoreRank in region
2GraceNorth674
3TomSouth543
4NiaNorth911
5OllieSouth454
6CaraNorth852
7DevSouth582
8FinnNorth823
9BenSouth631
D2 holds =COUNTIFS($B$2:$B$9,B2,$C$2:$C$9,">"&C2)+1, copied down. It counts the people in the same region with a higher score.

Ties work the same way as RANK: two people on the same score in a region share a place. There's more on COUNTIFS in COUNTIF and COUNTIFS.

Common mistakes

Lots of people ranked 1st

The list wasn't locked, so it slid down as the formula was copied. By the bottom row, each score is only compared with the few below it. Use $B$2:$B$13: press F4 on the range (on a Mac, Cmd+T).

The order is upside down

A 1 on the end of RANK means smallest first. Leave it off (or use 0) for biggest first.

The same name twice in a top 5

Two people share a score, and MATCH finds the first one both times. Use the TAKE and SORT way in Excel 365, or add a tie-break column and use LARGE on that.

Some scores aren't ranked

RANK gives #N/A for a score stored as text, and LARGE skips it. See numbers stored as text.

Try it now

Your turn

In D2, give each employee's rank, with 1 for the highest score. Your formula will be copied down to D13.

ABCD
1EmployeeRegionScoreRank
2GraceNorth67
3TomSouth54
4PriyaEast88
5MarekWest72
6NiaNorth91
7OllieSouth45
8AmiraEast79
9BenWest63
10CaraNorth85
11DevSouth58
12EwaEast70
13FinnWest82

Open this in Try a formula: the same sheet with the answer filled in, to change or share by link.

Part of Excel data analysis practice: every lesson on the topic, with a project in Excel.

Where it works

RANK, LARGE and SMALL work in every version of Excel, on Windows and Mac, and in Excel for the web. RANK.EQ and RANK.AVG need Excel 2010 or later. SORT needs Excel 2021 or later, and TAKE needs Excel 365 or Excel 2024.

Questions

How do I rank in Excel without duplicate ranks?

Add a tie-break that counts how many times the score has come up so far: =RANK(B2,$B$2:$B$50)+COUNTIF($B$2:B2,B2)-1. Only the start of the COUNTIF range is locked, so it grows as you copy down. The first person on a tied score keeps the place and the next one moves down one. If the tie should go by something else, such as the earlier finish time, sort the list by that first.

How do I rank from lowest to highest in Excel?

Add a 1 as the last part of RANK: =RANK(B2,$B$2:$B$50,1). The smallest number is then 1st, which suits race times, costs or days absent. Leave the last part off, or put 0, to give the biggest number 1st. For the lowest values themselves, use SMALL: =SMALL($B$2:$B$50,1) is the lowest and 2 gives the second lowest.

How do I show the names of the top 5 as well as the scores?

Find each score with LARGE, then look up the name with INDEX and MATCH: =INDEX($A$2:$A$50,MATCH(E2,$B$2:$B$50,0)). This shows the first name twice when two people tie, because MATCH stops at the first match. In Excel 365 or 2024, =TAKE(SORT(A2:B50,2,-1),5) gives the top 5 names and scores together, with each tied person shown.

How do I rank within a group in Excel?

Count how many rows in the same group have a higher score, then add 1: =COUNTIFS($B$2:$B$50,B2,$C$2:$C$50,">"&C2)+1, where column B holds the group and column C the score. The top of each group gets 1. Ties share a place, as with RANK. For lowest first, use "<" in place of ">".