How to sum the top N values in a range
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Add up just the largest few numbers, e.g. your top 3 sales.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel | =SUMPRODUCT(LARGE(A2:A6,{1,2,3})) | Change {1,2,3} to {1,2,3,4,5} etc. for a different N. |
| Google Sheets | =SUMPRODUCT(LARGE(A2:A6,{1,2,3})) | Identical. |
| LibreOffice Calc | =SUMPRODUCT(LARGE(A2:A6,{1,2,3})) | Identical. |
How it works
LARGE(range, {1,2,3}) returns the 1st, 2nd and 3rd largest values as an array (50, 40, 30); SUMPRODUCT adds them up to 120. Expand the array constant to sum a different number of top values.
Verified, not just documented
We ran =SUMPRODUCT(LARGE(A2:A6,{1,2,3})) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 120 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 120 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run Excel.
Functions used
SUMPRODUCT · LARGE — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to average the top N scores (drop the lowest)
- How to check if a cell contains any word from a list
- How to count cells that contain errors
- How to count the total words in a range
- How to list the top N values