Table of Contents
Excel LARGE function
3 things to know about LARGE function
Basic LARGE formula
How to use LARGE formula in Excel - examples
How to get top N values in Excel
How to sum or average largest N values
Get data associated with the n-th largest value
LARGE formula to sort numbers descending
LARGE formula for dates and times
Get a future date closest to today or specified date
Excel LARGE function not working
Practice workbook for download
Home Topics excel Excel LARGE function to get n-th highest value

Excel LARGE function to get n-th highest value

Mar 31, 2025 pm 03:38 PM

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 of this Website
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

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

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Excel formula to find top 3, 5, 10 values in column or row Excel formula to find top 3, 5, 10 values in column or row Apr 01, 2025 am 05:09 AM

This tutorial demonstrates how to efficiently locate the top N values within a dataset and retrieve associated data using Excel formulas. Whether you need the highest, lowest, or those meeting specific criteria, this guide provides solutions. Findi

Add a dropdown list to Outlook email template Add a dropdown list to Outlook email template Apr 01, 2025 am 05:13 AM

This tutorial shows you how to add dropdown lists to your Outlook email templates, including multiple selections and database population. While Outlook doesn't directly support dropdowns, this guide provides creative workarounds. Email templates sav

Regex to extract strings in Excel (one or all matches) Regex to extract strings in Excel (one or all matches) Mar 28, 2025 pm 12:19 PM

In this tutorial, you'll learn how to use regular expressions in Excel to find and extract substrings matching a given pattern. Microsoft Excel provides a number of functions to extract text from cells. Those functions can cope with most

How to customize Google Docs: guide on styles & formatting How to customize Google Docs: guide on styles & formatting Mar 24, 2025 am 10:24 AM

In this blog post, we delve into the various techniques and features available to customize your Google Docs. Follow these tips and tricks to be well on your way to creating documents that convey your content effectively and look polished

How to use Flash Fill in Excel with examples How to use Flash Fill in Excel with examples Apr 05, 2025 am 09:15 AM

This tutorial provides a comprehensive guide to Excel's Flash Fill feature, a powerful tool for automating data entry tasks. It covers various aspects, from its definition and location to advanced usage and troubleshooting. Understanding Excel's Fla

FV function in Excel to calculate future value FV function in Excel to calculate future value Apr 01, 2025 am 04:57 AM

This tutorial explains how to use Excel's FV function to determine the future value of investments, encompassing both regular payments and lump-sum deposits. Effective financial planning hinges on understanding investment growth, and this guide prov

How to add calendar to Outlook: shared, Internet calendar, iCal file How to add calendar to Outlook: shared, Internet calendar, iCal file Apr 03, 2025 am 09:06 AM

This article explains how to access and utilize shared calendars within the Outlook desktop application, including importing iCalendar files. Previously, we covered sharing your Outlook calendar. Now, let's explore how to view calendars shared with

How to remove / split text and numbers in Excel cell How to remove / split text and numbers in Excel cell Apr 01, 2025 am 05:07 AM

This tutorial demonstrates several methods for separating text and numbers within Excel cells, utilizing both built-in functions and custom VBA functions. You'll learn how to extract numbers while removing text, isolate text while discarding numbers

See all articles