How to find the 2nd (or Nth) largest or smallest value
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Return the Nth biggest or smallest number in a range, e.g. the runner-up, not just the max.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel | =LARGE(A2:A9,2) | 2nd largest. Use SMALL(range,2) for 2nd smallest; change 2 to N. |
| Google Sheets | =LARGE(A2:A9,2) | Identical. |
| LibreOffice Calc | =LARGE(A2:A9,2) | Identical. |
How it works
LARGE(range, k) returns the k-th largest value; SMALL(range, k) the k-th smallest. MAX is just LARGE(range,1). Among 10/50/20/40/30 the 2nd largest is 40.
Verified, not just documented
We ran =LARGE(A2:A6,2) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 40 — 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 40 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
LARGE — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to average the top N scores (drop the lowest)
- How to list the top N values
- How to sum the top N values in a range