To average the top 5 values in a range, use =AVERAGE(LARGE(B2:B21,{1,2,3,4,5})). LARGE normally returns one value at a time, but feeding it the array constant {1,2,3,4,5} makes it return all five at once, and AVERAGE then averages them. No Ctrl+Shift+Enter needed, even in older Excel.
For a different count, change the constant — but typing out {1,2,…,30} gets impractical, so use ROW instead: =AVERAGE(LARGE(B2:B21,ROW(INDIRECT("1:30")))). Better still, put the count in a cell and use =AVERAGE(LARGE(B2:B21,SEQUENCE(D1))) in Excel 365, so you can change D1 from 5 to 30 without touching the formula. To average the bottom values instead, swap LARGE for SMALL: =AVERAGE(SMALL(B2:B21,{1,2,3,4,5})).
Let’s say you have a line-up of 20 products in your company, and you have data for the monthly sales of all 20 products.
From that data, you want to calculate the average of the top 5 products. In short, you want to get the average of the top 5 values from that data. Look at the below example.

Formula: Average TOP 5 Values
To average the top 5 scores from the list, you can use a formula based on the combination of LARGE and AVERAGE. And, the formula will be:
=AVERAGE(LARGE(B2:B21,{1,2,3,4,5}))

How This Formula Works
To understand this formula, you need to split it into two parts. In the first part, we used the LARGE function.
LARGE Function
The LARGE function can return the nth largest value from data. If you specify 2 as the nth value, it will return the second-highest value from the data.
Here you need the top 5 values, not just one, so that you can average them. For this, you need to enter the below array as the nth value.
{1,2,3,4,5}
When you enter this into the function, it returns an array of the top 5 values, just like the one below.

In the end, the AVERAGE function returns the average of those values. Here you need to understand that the AVERAGE function can take this array without entering the formula with CTRL + SHIFT + ENTER.
LARGE ignores blank cells and text, so they don’t affect the result. But if the range has fewer than 5 numbers, LARGE can’t find the 5th largest value and the formula returns the #NUM! error. And if two products have the same sales, both values are counted.
Average Top N Values with a Cell Reference
If you want to change the number of top values without editing the formula, enter that number in a cell (D1 here). In Microsoft 365 and Excel 2021, use SEQUENCE to create the list of positions:
=AVERAGE(LARGE(B2:B21,SEQUENCE(D1)))
In older versions, use SUMPRODUCT with ROW and INDIRECT instead, which works without CTRL + SHIFT + ENTER:
=SUMPRODUCT(LARGE(B2:B21,ROW(INDIRECT("1:"&D1))))/D1
Average Bottom 5 Values
To get the average of the 5 lowest values, replace LARGE with SMALL:
=AVERAGE(SMALL(B2:B21,{1,2,3,4,5}))
Average Top 5 Values with a Condition
Let’s say you have the product category in column A and you want the average of the top 5 values for the category “X” only. Use IF inside LARGE, so only the values of that category go to LARGE. In Excel 2019 and older, enter it with CTRL + SHIFT + ENTER:
=AVERAGE(LARGE(IF(A2:A21="X",B2:B21),{1,2,3,4,5}))
Average Top 5 Values When the Range Has Errors
If any cell in the range has an error like #DIV/0!, LARGE returns that error too. In Excel 2010 and later, use AGGREGATE instead of LARGE. Function 14 is LARGE, and option 6 tells it to ignore errors:
=AVERAGE(AGGREGATE(14,6,B2:B21,{1,2,3,4,5}))
Frequently Asked Questions
Does this formula ignore blank cells?
Yes. LARGE only looks at numbers, so blank cells and text are skipped. Zeros are numbers, though, so they are counted.
Why does the formula return #NUM!?
The range has fewer numbers than the positions you asked for. For example, {1,2,3,4,5} needs at least 5 numbers in the range.
How do I sum the top 5 values instead?
Replace AVERAGE with SUM in the same formula:
=SUM(LARGE(B2:B21,{1,2,3,4,5}))
=AVERAGE(LARGE(B2:B21,{1,2,3,4,5}))
how to find product wise average value of largest 30 product.
We can not mention 1,2,…..30. How to combine 1 to 30 value in short like 1-30
Thanks….
https://prnt.sc/cnBDDdw7xcXJ
Thanks.
Thanks Puneet for Sharing.
However just I had a thought If I have a Large Data Set,It will not be possible to mention the array value uptill which I need to Calculate the Average.
We can instead use dynamic function like as I tried on my dataset:
“{=Average(If(Array of Rank DataRank,Array of Related Data))},Note – {}, Thsi will make it as Array Function by Cltr+Shift+Enter”.
Thanks!!
Anubhav
what is the difference if we use only =average(a1:a2) and =average(large(array,n))
What if your range is A1:A100? To find the average of the 5 largest values in a range using =average(a1:a5) requires the data in the range to be sorted largest to smallest (forcing them to be in the range A1:A5). Using the array formula =average(large(A1:A100,{1,2,3,4,5})) will choose the 5 largest values in the range no matter where they are in the range or what order they are in.
@plastic_cup:disqus More Power to You
10xx… i got it
You will get the average of the range, not just the top 5.