formulastreak

Statistics functions

LARGE and SMALL functions in Google Sheets and Excel

LARGE returns the k-th largest value in a range and SMALL the k-th smallest, for top and bottom lists.

SMALL returns the k-th smallest value in a range: k = 1 is the minimum, 2 the next one up.

Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet

Syntax

LARGE(array, k)
SMALL(array, k)

Arguments in [brackets] are optional. In Google Sheets: LARGE(data, n) and SMALL(data, n).

Example

=LARGE($C$2:$C$9,G2) reads: Return the G2-th largest July figure in the locked range $C$2:$C$9; filled down beside 1, 2 and 3 in G2:G4, that's the top three.

Q3 sales team · edit H2 and watch it recalculate
Click a cell (or use the arrow keys) to insert its address · Enter shows the resultH2 = $15,200
ABCDEFGH
1RepRegionJulAugSepTargetRankJul
2Amara OseiNorth$12,400$13,100$11,800$36,0001$15,200
3Ben FischerSouth$9,800$10,250$12,100$30,0002$14,500
4Lina ChenEast$15,200$14,800$16,900$45,0003$13,300
5Diego AlvarezWest$8,700$9,100$8,400$28,000
6Eva NovakNorth$11,200$12,600$13,900$36,000
7Farid HaddadSouth$13,300$12,900$14,100$39,000
8Grace KimEast$10,100$9,600$10,800$33,000
9Hugo MartinWest$14,500$15,800$15,100$42,000

H2 to H4 show $15,200, $14,500 and $13,300: the three best Julys.

How the spreadsheet calculates it

Finds the k-th largest number in $C$2:$C$9, with k = G2.

  1. 1. LARGE: Finds the k-th largest number in $C$2:$C$9, with k = G2.
    • range = `$C$2:$C$9`: the numbers, locked for filling
    • k = `G2`: which place

SMALL example

=SMALL($E$2:$E$9,G2) reads: Return the G2-th smallest September figure in $E$2:$E$9; filled down beside 1, 2 and 3, that's the three weakest Septembers.

Q3 sales team · edit H2 and watch it recalculate
Click a cell (or use the arrow keys) to insert its address · Enter shows the resultH2 = $8,400
ABCDEFGH
1RepRegionJulAugSepTargetRankSep
2Amara OseiNorth$12,400$13,100$11,800$36,0001$8,400
3Ben FischerSouth$9,800$10,250$12,100$30,0002$10,800
4Lina ChenEast$15,200$14,800$16,900$45,0003$11,800
5Diego AlvarezWest$8,700$9,100$8,400$28,000
6Eva NovakNorth$11,200$12,600$13,900$36,000
7Farid HaddadSouth$13,300$12,900$14,100$39,000
8Grace KimEast$10,100$9,600$10,800$33,000
9Hugo MartinWest$14,500$15,800$15,100$42,000

H2 to H4 show $8,400, $10,800 and $11,800: the three weakest Septembers.

More LARGE and SMALL examples

  • =LARGE(C2:C9,1)The best July: the same as MAX.
  • =SUM(LARGE(C2:C9,{1,2,3}))The top three July figures added together.
  • =XLOOKUP(LARGE($C$2:$C$9,G2),$C$2:$C$9,$A$2:$A$9)The rep behind each top value (fill down beside the ranks).
  • =LARGE(D2:D13,2)On the exam sheet: the second-highest score.
  • =SMALL(E2:E9,1)The weakest September: the same as MIN.
  • =AVERAGE(SMALL(D2:D13,{1,2,3}))The average of the three lowest exam scores.
  • =XLOOKUP(SMALL($E$2:$E$9,G2),$E$2:$E$9,$A$2:$A$9)The rep behind each of the weakest Septembers.

Paste any of these into the formula explainer to see it step by step.

Tips

  • Put the ranks 1, 2, 3 in a column and refer to them for k.
  • Lock the range with $ before filling down.
  • Use an array of ranks, like {1,2,3}, to get several values in one formula.

What LARGE and SMALL are used for

Top-three and bottom-three lists in sales reports, the second-highest bid or score, summing the best results, and the cheapest options in a price list.

Arguments

LARGE

ArgumentRequiredWhat it is
arrayYesThe numbers to look through, locked with $ when you fill down: $C$2:$C$9.
kYesThe position from the top: 1 for the largest, 2 for the second largest.Watch out: k of 0 or less, or more than the number of values, gives #NUM!.

SMALL

ArgumentRequiredWhat it is
arrayYesThe numbers to look through, locked when you fill down: $E$2:$E$9.
kYesThe position from the bottom: 1 for the smallest.Watch out: k of 0 or less, or more than the number of values, gives #NUM!.

Common mistakes

  • Expecting a name: LARGE returns the value. Look the value up to find whose it is.

  • Typing k into the formula (1, then 2, then 3) instead of referring to a column of ranks, so the formula can't simply be filled down.

  • Expecting ties to be skipped: if two values tie for first, LARGE returns that value for both k = 1 and k = 2.

  • Using LARGE with a big k instead: it breaks when the list grows.

  • Using it on a range where blanks stand for zero sales: empty cells are skipped, so the smallest value is the smallest one typed in.

  • Pointing SMALL and the lookup that finds the name at ranges of different heights.

In Google Sheets

Google Sheets has LARGE and SMALL with the same two arguments (LARGE(data, n) and SMALL(data, n)).

Errors you may see with LARGE and SMALL

  • #NUM!: k is 0 or less, larger than the number of values, or the range has no numbers.
  • #VALUE!: k is text that can't be read as a number.

Questions

How do I find the name that goes with the top value?

Look the value up: XLOOKUP(LARGE($C$2:$C$9,G2), $C$2:$C$9, $A$2:$A$9) returns the rep with the G2-th best July. Ties return the first match.

How do I sum the top three?

SUM(LARGE(C2:C9, {1,2,3})) adds the three largest values in one formula.

What's the difference between LARGE and MAX?

LARGE(range, 1) is the same as MAX. LARGE also gives the 2nd, 3rd and so on; likewise SMALL(range, 1) is MIN.

LARGE or SORT for a top list?

LARGE works in every version and returns just the values. Where you have SORT and TAKE, TAKE(SORT(C2:C9,,-1),3) returns the top three in one spilled formula.

Practise LARGE and SMALL on a live sheet

Lesson 51, Top N and rankings (Unit 15, Reporting patterns), has 7 graded exercises, checked instantly, with steps and hints when you're stuck. Pro