search
HomeTopicsexcelExcel LARGE function to get n-th highest value

This article will guide you on how to use LARGE function in Excel with many formula examples.

When analyzing a set of numbers, it often makes sense to find the biggest ones. Getting the highest value is super-easy with the MAX function. When it comes to targeting a specific largest value, say the 2nd or the 3rd biggest number in a dataset, the LARGE function comes in handy.

Excel LARGE function

The LARGE function in Excel is used to return the n-th largest value from a numeric data set. For example, it can calculate the highest score, the 2nd largest order, the 3rd place result, and so on.

The syntax consists of two argument, both of which are required:

LARGE(array, k)

Where:

  • Array - a range or an array where to search for the largest value.
  • K - the position from the highest to return, i.e. k-th largest value in a dataset.

LARGE is categorized under Statistical functions. It is available in all versions of Excel for Office 365, Excel 2021, Excel 2019, Excel 2016, Excel 2013, Excel 2010, and earlier.

3 things to know about LARGE function

Before we get to more practical things and start building our own formulas, please pay attention to 3 simple facts that explain the essentials:

  1. The LARGE function processes only numeric values. Blank cells, text, and logical values are ignored.
  2. If array contains any errors, an error is returned.
  3. In case array contains n values, LARGE(array,1) will return the maximin value, and LARGE(array,n) will return the minimum value.

Basic LARGE formula

In its basic form, a LARGE formula in Excel is very easy to build. For the 1st argument, you supply a range of numeric values. In the 2nd argument, you define the position from largest to return.

In the sample table below, supposing you wish to know the 2nd largest score. This can be done with the following formula:

=LARGE(B2:B10, 2)

Excel LARGE function to get n-th highest value

How to use LARGE formula in Excel - examples

And now, let's look at more specific use cases and see how the LARGE function could be helpful.

How to get top N values in Excel

To get the largest 3, 5, 10, etc. values with a single formula, carry out these steps:

  1. Type the positions of interest in separate cells. These numbers will be used as k values.
  2. Make a LARGE formula applying an absolute range reference for array ($B$2:$B$10 in our case) and relative cell reference for k (D3).
  3. Enter the formula in the topmost cell, and then drag it down to the below cells. Done!

As an example, we are going to find the top 3 scores in the table below. For this, we type the numbers 1, 2 and 3 in D3, D4 and D5, respectively, and enter the following formula in E3:

=LARGE($B$2:$B$10, D3)

Drag it through E4, and you will get this result:

Excel LARGE function to get n-th highest value

Instead of typing the positions on the sheet, you can use the ROWS function with an expanding range reference to generate the k values automatically as explained in Excel formula to find top N values in a list.

=LARGE($B$2:$B$10, ROWS(B$2:B2))

Excel LARGE function to get n-th highest value

Tip. You can also use the LARGE function to extract top N records with advanced filter.

How to sum or average largest N values

To sum top n values in a data set, you can use LARGE together with either SUMPRODUCT or SUM in this way:

SUMPRODUCT(LARGE(array, {1, …, n }))

Or

SUM(LARGE(array, {1, …, n}))

To average the highest n values, combine the AVERAGE and LARGE functions:

AVERAGE(LARGE(array, {1, …, n}))

To see how it works in practice, let's find an average of the top 3 scores in our sample table. For this, we are using this formula:

=AVERAGE(LARGE(B2:B10, {1,2,3}))

To add up the highest 3 scores, the formula is:

=SUM(LARGE(B2:B10, {1,2,3}))

Excel LARGE function to get n-th highest value

Note. In case you use a range rather than an array constant for k, you need to press Ctrl Shift Enter to make it an array formula. In Excel 365 that supports dynamic arrays, all formulas can be completed as usual by pressing the Enter key.

How these formulas work:

Normally, the LARGE function returns a single value based on the k number. In these formulas, we supply an array constant like {1,2,3} for the k argument forcing it to return an array of values. That array goes to the outer function to be summed or averaged.

Get data associated with the n-th largest value

To retrieve information relating to the largest values, just nest the LARGE function in the canonical INDEX MATCH formula:

INDEX(return_array, MATCH(LARGE(lookup_array, n), lookup_array, 0))

Where:

  • Return_array is a range from which to extract matches.
  • Lookup_array is a range of numbers to rank from highest.
  • N is the position of the largest value to search for.

For example, to get the name of a student who did best on the exams, nter this formula in F3:

=INDEX($A$2:$A$10, MATCH(LARGE($B$2:$B$10, $D3), $B$2:$B$10, 0))

Where A2:A10 is the return array (names), B2:B10 is the lookup array (scores) and D3 is the position from largest.

To find out who has the 2nd and 3rd highest scores, copy the forma to F4 and F5:

Excel LARGE function to get n-th highest value

Notes:

  • This solution works nice for unique values. If your dataset contains duplicate numbers, "ties" in ranking may occur, which will produce incorrect results. To prevent this from happening, use a more complex formula to handle ties.
  • In Excel 365, you can use new dynamic array functions to work out a much simpler solution that resolves a problem of ties automatically. For full details, please see How to filter top N values in Excel.

LARGE formula to sort numbers descending

To quickly sort a list of numbers in Excel 365, you can use the new SORT function. In Excel 2019, 2016 and earlier versions that do not support dynamic arrays, we have to rely on the good old LARGE function to sort descending and SMALL to sort ascending.

For this example, we will sort numbers in A2:A10 from highest to lowest. To have it done, we'll again need the ROWS function with an expanding range reference to increment the k argument by 1 with every row:

=LARGE($A$2:$A$10, ROWS(A$2:A2))

The above formula goes to the topmost cell (C2). And then, you drag it through as many cells as there are numbers in the original list (C2:C10 in our case):

Excel LARGE function to get n-th highest value

LARGE formula for dates and times

As you know, dates and times in Excel are numeric values: dates are stored as integers and times as decimals. What does that mean for us? The LARGE function calculates date and time values in exactly the same way as it does numbers. In other words, the formula you used for numbers will work for dates and times too!

Assuming you have a list of dates in B2:B10, the following formula will return the most recent N dates, depending on how many cells you copy it to:

=LARGE($B$2:$B$10, ROWS(B$2:B2))

Excel LARGE function to get n-th highest value

The same formula can also find the longest 3 times:

Excel LARGE function to get n-th highest value

Get a future date closest to today or specified date

This example shows a more specific usage of the Excel LARGE function with dates.

From a list of dates in B2:B10, suppose you wish to return a future date closest to today. To accomplish the task, we'll use the COUNTIF and TODAY functions together to calculate a value for the k argument of LARGE:

=LARGE($B$2:$B$10, COUNTIF($B$2:$B$10, ">"&TODAY()))

To find the next but one date, the formula is:

=LARGE($B$2:$B$10, COUNTIF($B$2:$B$10, ">"&TODAY())-1)

Excel LARGE function to get n-th highest value

To find a date that comes right after a given date, input the target date in some cell (E3 in this example), and concatenate that cell reference in COUNTIF's criteria:

=LARGE($B$2:$B$10, COUNTIF($B$2:$B$10, ">"&E1))

Excel LARGE function to get n-th highest value

In situation when a date matching your criteria is not found, you can use the IFERROR function as a "wrapper" to catch an error and replace it with whatever text you see fit:

=IFERROR(LARGE($B$2:$B$10, COUNTIF($B$2:$B$10, ">"&E1)), "Not found")

Excel LARGE function to get n-th highest value

How this formula works:

In essence, you use the COUNTIF function to count how many dates in the list are greater than today or a specified date. That count is the k value the LARGE function needs.

At the moment of writing, today's date was October 7, 2020. The COUNTIF function with ">"&TODAY() for criteria determined that in B2:B10 there are 4 dates greater than 7-Oct-2020. Meaning, the 4th largest date in the list is the closest future date we are looking for. So, we plug COUNTIF into the 2nd argument of LARGE and get the desired result:

=LARGE($B$2:$B$10, 4)

The next but one date is the 3rd largest date in our case. To get it, we subtract 1 from COUNTIF's result.

Excel LARGE function not working

A LARGE formula may throw a #NUM! error because of the following reasons:

  • The supplied array is empty or does not contain a single numeric value.
  • The k value is a negative number.
  • The k value is greater than the number of values in array.

That's how to use the LARGE function in Excel to find highest values in a dataset. I thank you for reading and hope to see you on our blog next week!

Practice workbook for download

Excel LARGE formula examples (.xlsx file)

The above is the detailed content of Excel LARGE function to get n-th highest value. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MEDIAN formula in Excel - practical examplesMEDIAN formula in Excel - practical examplesApr 11, 2025 pm 12:08 PM

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Google Spreadsheet COUNTIF function with formula examplesGoogle Spreadsheet COUNTIF function with formula examplesApr 11, 2025 pm 12:03 PM

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

Excel shared workbook: How to share Excel file for multiple usersExcel shared workbook: How to share Excel file for multiple usersApr 11, 2025 am 11:58 AM

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

How to convert Excel to JPG - save .xls or .xlsx as image fileHow to convert Excel to JPG - save .xls or .xlsx as image fileApr 11, 2025 am 11:31 AM

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

Excel names and named ranges: how to define and use in formulasExcel names and named ranges: how to define and use in formulasApr 11, 2025 am 11:13 AM

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

Standard deviation Excel: functions and formula examplesStandard deviation Excel: functions and formula examplesApr 11, 2025 am 11:01 AM

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

Square root in Excel: SQRT function and other waysSquare root in Excel: SQRT function and other waysApr 11, 2025 am 10:34 AM

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Google Sheets basics: Learn how to work with Google SpreadsheetsGoogle Sheets basics: Learn how to work with Google SpreadsheetsApr 11, 2025 am 10:23 AM

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software