How to Use the RANK Function in Google Sheets

By Tomosuke Hasegawa · Updated Oct 29, 2026 · Beginner · 5 min read · includes 2 free exercises

In short: RANK returns the rank of a value within a list. The formula is =RANK(value, data, [is_ascending]). By default the greatest value gets rank 1.

What RANK does

RANK tells you where a value stands in a list: first, second, third. Use it for sales leaderboards, grade tables and any "top N" report. To list the values in order instead, use SORT.

RANK syntax

=RANK(value, data, [is_ascending])

Google's help page does not say how tied values are ranked, so check your own data if ties are possible.

A step-by-step example

Here are four scores in cells A1:B5.

AB
1NameScore
2Ann82
3Ben54
4Cara67
5Dev91
=RANK(B2, B2:B5)

This returns 2. Here is why: Ann's 82 is the second greatest score, behind Dev's 91. To rank from the lowest instead:

=RANK(B2, B2:B5, 1)

This returns 3, because with ascending order the order is 54, 67, 82, 91 and 82 is third.

Fill it down safely

To rank every row, lock the data range with dollar signs so it does not shift when you copy the formula down: =RANK(B2, $B$2:$B$5).

Common mistakes

Try it yourself

Use the table above (A1:B5). Type your formula into the box, starting with =, then press Check.

Exercise 1: Highest is 1

Write a formula that ranks the score in B2 within B2:B5, with the highest score as rank 1.

Hint: the default order already does this.

Exercise 2: Lowest is 1

Write a formula that ranks the score in B2 within B2:B5, with the lowest score as rank 1.

Hint: set the third argument to 1.

What to learn next

Syntax and rules in this guide were checked against Google's RANK help page. See all guides.