Function Problems

Sum the Top Five Values in Excel Using LARGE or AGGREGATE

Tauseeq MagsiTauseeq Magsi Dec 2, 2026 868 views

Question details

The user wants to sum the five largest numbers in an Excel dataset.

How to Sum the Top Five Values in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains a range of numbers, and the user needs a total of its five largest values.
Observed behavior
The desired result is a single total of the five highest numeric values in the range.
Before you start

Identify the range containing your numbers and confirm it has at least five numeric values. Replace D2:D22 in the examples with your own range, and check whether hidden rows should be included.

Solution 1Recommended

Use LARGE to Sum the Five Highest Values

Use this formula when you want to include values in hidden rows and the range contains no errors.

1
Select a result cell

Click an empty cell where you want to display the total.

2
Enter the formula

Type =SUM(LARGE(D2:D22,{1,2,3,4,5})) in the cell or formula bar, replacing D2:D22 with your data range.

3
Calculate the total

Press Enter. LARGE returns the first through fifth largest values, and SUM adds them.

Older Excel versions: If the formula does not calculate as expected in an older version of Excel, select the formula cell and confirm the formula with Ctrl+Shift+Enter.
Sum top values in WPS

Sum the Five Largest Values in WPS Spreadsheets

Use the LARGE and SUM functions in WPS Spreadsheets to calculate the total of the five highest numbers in a worksheet range.

  1. 1. Open your spreadsheet: Open WPS Spreadsheets and select File > Open to choose your workbook.
  2. 2. Select a result cell: Click an empty cell where the top-five total should appear.
  3. 3. Enter the formula: Type =SUM(LARGE(D2:D22,{1,2,3,4,5})) in the formula bar, replacing D2:D22 with your range.
  4. 4. Calculate and save: Press Enter to calculate the total, then select File > Save to save the workbook.
Calculate a top-five total with one formulaOpen and edit Microsoft Excel XLSX and XLS filesWork with spreadsheet formulas in a familiar interface
microsoft office alternative - wps office

Frequently Asked Questions

Does the LARGE formula include duplicate values?

Yes. LARGE treats duplicate numbers as separate entries. For example, two occurrences of the highest value can both appear among the top five.

What happens if my range contains fewer than five numbers?

LARGE returns a #NUM! error when asked for a position beyond the available numeric values. Check the range and make sure it contains at least five numbers.

How can I exclude hidden rows from the calculation?

Use =SUM(AGGREGATE(14,1,D2:D22,{1,2,3,4,5})). The option 1 tells AGGREGATE to ignore hidden rows.

How do I sum a different number of top values?

Change the positions in the array constant. For example, =SUM(LARGE(D2:D22,{1,2,3})) sums the three largest values.