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
- Excel 2016
- Excel 2019
- Excel 2021
- Excel 2024
- Microsoft 365
- Google Sheets
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.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Rep | Region | Jul | Aug | Sep | Target | Rank | Jul |
| 2 | Amara Osei | North | $12,400 | $13,100 | $11,800 | $36,000 | 1 | $15,200 |
| 3 | Ben Fischer | South | $9,800 | $10,250 | $12,100 | $30,000 | 2 | $14,500 |
| 4 | Lina Chen | East | $15,200 | $14,800 | $16,900 | $45,000 | 3 | $13,300 |
| 5 | Diego Alvarez | West | $8,700 | $9,100 | $8,400 | $28,000 | ||
| 6 | Eva Novak | North | $11,200 | $12,600 | $13,900 | $36,000 | ||
| 7 | Farid Haddad | South | $13,300 | $12,900 | $14,100 | $39,000 | ||
| 8 | Grace Kim | East | $10,100 | $9,600 | $10,800 | $33,000 | ||
| 9 | Hugo Martin | West | $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. LARGE: Finds the k-th largest number in
$C$2:$C$9, with k =G2.range=`$C$2:$C$9`: the numbers, locked for fillingk=`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.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Rep | Region | Jul | Aug | Sep | Target | Rank | Sep |
| 2 | Amara Osei | North | $12,400 | $13,100 | $11,800 | $36,000 | 1 | $8,400 |
| 3 | Ben Fischer | South | $9,800 | $10,250 | $12,100 | $30,000 | 2 | $10,800 |
| 4 | Lina Chen | East | $15,200 | $14,800 | $16,900 | $45,000 | 3 | $11,800 |
| 5 | Diego Alvarez | West | $8,700 | $9,100 | $8,400 | $28,000 | ||
| 6 | Eva Novak | North | $11,200 | $12,600 | $13,900 | $36,000 | ||
| 7 | Farid Haddad | South | $13,300 | $12,900 | $14,100 | $39,000 | ||
| 8 | Grace Kim | East | $10,100 | $9,600 | $10,800 | $33,000 | ||
| 9 | Hugo Martin | West | $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
| Argument | Required | What it is |
|---|---|---|
| array | Yes | The numbers to look through, locked with $ when you fill down: $C$2:$C$9. |
| k | Yes | The 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
| Argument | Required | What it is |
|---|---|---|
| array | Yes | The numbers to look through, locked when you fill down: $E$2:$E$9. |
| k | Yes | The 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
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.
Sources
Official documentation the facts on this page were checked against.