Skip to content
Google Sheets

RANK function in Google Sheets

Returns the rank of a specified value in a dataset.

=RANK(value, data, [is_ascending])

RANK syntax and parameters

Three arguments, two required.

  • valueanyRequired

    The value whose rank will be determined. If data does not contain value in any cell or element, RANK will return the #N/A error.

  • dataarrayRequired

    The array or range containing the dataset to consider.

  • is_ascendingnumberOptional

    [ OPTIONAL - 0 by default ] Whether to consider the values in data in descending or ascending order. If this is 0, the greatest value in data will have rank 1; if this is 1, the least value in data will have rank 1.

RANK examples

Formulas you'll actually reuse.

  1. A rep's position on the sales leaderboard, biggest first:

    =RANK(B2, B$2:B$50)

    Result7

  2. Ascending rank — lap times, where smallest wins:

    =RANK(B2, B$2:B$50, 1)

    Result3

RANK in Excel

Same name — your formula ports as-is.

Try RANK in the playground

Edit the example — nothing to install.

Preloaded with the RANK formula from Example 1 — change anything and watch it respond.

Loading the editor…

RANK errors

What they mean — and the fixes.

  • #N/A

    The value isn't in the reference range — RANK matches exactly; check the range covers the row you're ranking.