0Pricing
Excel Formulas Academy · Lesson

Ranking With RANK and PERCENTILE

Order values and find the value at a given percentile.

Ranking With RANK and PERCENTILE is a free Excel Formulas Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Excel Formulas Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Where Does a Value Stand?

Often you do not just want the value, you want its position within the group. Is this salesperson 1st or 12th? Is this score in the top 10%?

Two function families answer this: RANK tells you the ordinal position, and PERCENTILE tells you the value at a given cutoff. Together they turn raw numbers into rankings and benchmarks.

The RANK.EQ Function

RANK.EQ gives a value's position within a range. You pass the value, the range, and an order flag.

  • Order 0 (or omitted) ranks largest-first (descending).
  • Order 1 ranks smallest-first (ascending).

Here the highest sales figure gets rank 1.

=RANK.EQ(B2,$B$2:$B$20,0)

Locking the Range for Fill-Down

Notice the dollar signs: $B$2:$B$20. The range must stay fixed as you copy the formula down, while the value reference B2 shifts to B3, B4, and so on.

Forget the dollar signs and the range slides with each row, producing nonsense ranks. Absolute references on the range are essential here.

=RANK.EQ(B2,$B$2:$B$20,0)

Handling Ties

RANK.EQ gives tied values the same rank, then skips the next. If two values tie for 2nd, both show 2 and the next gets 4 (no 3rd place).

If you instead want the average rank for ties, use RANK.AVG. Two values tied for 2nd and 3rd would each show 2.5.

=RANK.AVG(B2,$B$2:$B$20,0)

Breaking Ties for Unique Ranks

To force unique ranks even with ties, add a COUNTIF tiebreaker. It counts how many equal values appear above the current row and adds that offset.

This guarantees a clean 1, 2, 3, 4 sequence with no duplicates, which is useful for leaderboards.

=RANK.EQ(B2,$B$2:$B$20,0)+COUNTIF($B$2:B2,B2)-1

Percentile: Value at a Cutoff

PERCENTILE.INC answers: what value sits at a given percentage point? Pass the range and a fraction between 0 and 1.

The formula below returns the 90th percentile, the value below which 90% of the data falls. It is perfect for setting thresholds like "top 10% performers."

=PERCENTILE.INC(A2:A101,0.9)

Quartiles Are Just Percentiles

Quartiles split data into four parts. The QUARTILE.INC function is a shortcut: quartile 1 equals the 25th percentile, quartile 2 the 50th (the median), and quartile 3 the 75th.

The formula below returns the third quartile, identical to PERCENTILE.INC(A2:A101,0.75).

=QUARTILE.INC(A2:A101,3)

Inclusive vs Exclusive

There are two flavors: PERCENTILE.INC (inclusive, accepts 0 and 1) and PERCENTILE.EXC (exclusive, only between 0 and 1, never the extremes).

For most everyday reporting, .INC is the standard choice. Use .EXC when following statistical conventions that exclude the boundary points.

=PERCENTILE.EXC(A2:A101,0.9)

Percent Rank: The Reverse Question

RANK gives a position; PERCENTILE gives a value at a cutoff. PERCENTRANK.INC does the reverse of percentile: given a value, what percentile is it?

If a student scored 88 and PERCENTRANK returns 0.92, that student outperformed 92% of the group. Multiply by 100 to display it as a percent.

=PERCENTRANK.INC(A2:A101,88)

Ignoring Text and Blanks

RANK and PERCENTILE work only on numbers. Text labels and blank cells inside the range are ignored, so a stray header will not break your ranking.

Be careful with numbers stored as text, though: they are skipped entirely, which shifts every rank and percentile. If a rank looks off, check that all your values are true numbers, not left-aligned text.

=RANK.EQ(B2,$B$2:$B$20,0)

Worked Example: Sales Leaderboard

You have 20 reps with sales in column B. You want each rep's rank and whether they are in the top quartile.

  • Rank: =RANK.EQ(B2,$B$2:$B$21,0)
  • Top-quartile flag compares their sales to the 75th percentile.

The formula below returns Top or Standard for each rep based on the cutoff.

=IF(B2>=PERCENTILE.INC($B$2:$B$21,0.75),"Top","Standard")

Quick Check

Test your understanding of ranking functions.

Recap: RANK and PERCENTILE

You learned to position values within a group:

  • RANK.EQ gives ordinal position; order 0 = largest first, 1 = smallest first. Lock the range with $.
  • RANK.AVG averages tied ranks; add COUNTIF for unique ranks.
  • PERCENTILE.INC returns the value at a cutoff; QUARTILE.INC is a 25/50/75 shortcut.
  • PERCENTRANK.INC reverses it: the percentile of a given value.

Frequently asked questions

Is the “Ranking With RANK and PERCENTILE” lesson free?

Yes — the full text of “Ranking With RANK and PERCENTILE” is free to read here on the web, and the Excel Formulas Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Excel Formulas Academy course, upgrade to CoddyKit PRO.

What will I learn in “Ranking With RANK and PERCENTILE”?

Order values and find the value at a given percentile. You practise Excel Formulas Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Excel Formulas Academy?

No prior experience is required. Excel Formulas Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Ranking With RANK and PERCENTILE” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Excel Formulas Academy lesson?

Yes. Every Excel Formulas Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Center With MEDIAN and MODE
  2. Spread With STDEV and VAR
  3. Ranking With RANK and PERCENTILE
  4. Top and Bottom With LARGE and SMALL
← Back to Excel Formulas Academy