Excel LARGE and SMALL: find the nth largest or smallest value

In Excel, use LARGE to find the kth largest value and SMALL to find the kth smallest. For 10, 20, 30, 40, and 50, setting k to 2 gives 40 and 20 respectively. Setting k to 1 gives the maximum and minimum.

Find the second largest and smallest values

Enter 10, 20, 30, 40, and 50 in B3:F3. The first formula returns 40, the second value from the top. The second returns 20, the second from the bottom. Change k to 1 to get 50 and 10. You can leave the source cells in their original order. Excel’s argument separator can vary by region.

=LARGE(B3:F3,2)
=SMALL(B3:F3,2)

Microsoft’s LARGE function reference

Microsoft’s SMALL function reference

How duplicate values affect position

Enter 10, 20, 20, and 30 in B6:E6. In descending order the values are 30, 20, 20, and 10, so both formulas below return 20. To find the second largest distinct value, make a separate copy of the numbers, remove duplicates, and calculate from that list.

=LARGE(B6:E6,2)
=LARGE(B6:E6,3)

Return the top three values in a list

Enter 1, 2, and 3 in H3:H5 and the formula below in I3. Copy I3 down through I5 to get 50, 40, and 30. The dollar signs keep B3:F3 fixed while H3 changes to H4 and H5. If you also want to look up product names, decide which row or rows to return when values tie.

=LARGE($B$3:$F$3,H3)

Check the range and k if you get an error

Choose an integer from 1 to the number of numeric values in the range. In the first example, k of 6 or 0 returns #NUM!. A range without numbers also causes an error.

If Excel sees fewer numbers than expected, check for blanks and numbers stored as text. For simple and conditional extremes, see MAX, MIN, MAXIFS, and MINIFS.