EXCEL SOLUTIONS

RANK function in Excel

Tells you the position of a number in a list: 1 for the highest, 2 for the next, and so on.

IntermediateTotals and maths

Syntax

=RANK(number, ref, [order])
Arguments of RANK
ArgumentWhat it means
numberThe number to rank.
refThe range of numbers to compare it with.
orderOptional. 0 or left out ranks from largest. 1 ranks from smallest.

Examples with results

Every result below is calculated by the practice engine on the sample data shown, not typed in by hand.

Class scores (fictional)

RowABCD
1StudentMathsScienceEnglish
2Layla788591
3Omar627058
4Priya958892
5Quinn455261
6Rosa887984
Class scores (fictional) Row 1 holds the headings. All data is fictional. Dates are year-month-day.

Download CSV

  • =RANK(B3,B2:B6)4

    Omar’s position in Maths (1 = highest)

  • =RANK(B3,B2:B6,1)2

    The same, counting from the lowest

Try it yourself

Change the formula or switch to other sample data.

Press Calculate to see the result.

The practice box runs in your browser with BDK’s own calculator, which covers about 60 common functions. Cell references work as in Excel (B2, B2:B9). Your formulas are not saved or sent anywhere. For anything unusual, check the result in Excel itself.

How people use RANK at work

  • Education

    Position of one student in a subject.

    =RANK(D2,D2:D6)2
    Data: Class scores (fictional)
  • Sales

    Rank an order by quantity.

    =RANK(B3,B2:B9)7
    Data: Office supplies sales (fictional)

Common mistakes and tips

  • Equal numbers get the same rank and the next rank is skipped.
  • The reference range should be fixed with $ signs when you copy the formula down: $B$2:$B$6.

Works in

All versions of Excel, and Google Sheets.

Related formulas

LARGEMAX

Lessons that use it

Need Something Different? Let’s Talk.

Looking for different features or something built around your workflow? Share your idea with us.