MAX Function in Excel — Find the Largest Value (2026 Guide) | Sheets & Cells
Statistical · Basic Aggregate

MAX Function in Excel

Returns the largest number in a range. Highest sales rep, latest date, tallest peak — MAX is your "who won?" function. Plus a bonus: pair it with LARGE to slice off top-3 sums, top-10 averages, and the whole Top-N reporting stack.

Universal Support
MAX has existed in Excel since Excel 1.0 (1985). Works identically in Excel 2003, 2007, 2010, 2013, 2016, 2019, 2021, Microsoft 365, Excel Online, Excel Mobile, Google Sheets, and LibreOffice Calc. No compatibility caveats.

MAX vs MAXA — The Text-and-TRUE Trap

Like MIN vs MINA, but sneakier. MAXA counts TRUE as 1, and with negative-only data that "1" can silently become your maximum.

50, 80, 120
MAX = 120
MAXA = 120
Numbers only → both agree
"pending", 50, 80
MAX = 80
MAXA = 80
Text counts as 0. Both still return 80 here.
TRUE, 50, 80
MAX = 80
MAXA = 80
TRUE counts as 1. 80 still wins.
TRUE, -50, -80
MAX = -50
MAXA = 1
Negative data + TRUE → MAXA silently returns 1
The dangerous case: when your data is entirely negative (loss reports, temperature dips, deltas from a baseline), MAXA reads a lone TRUE as 1 and calls it the maximum. You get "1" as your "maximum loss" when the real max was -50. Every "why does my max show 1?" bug is this. Use MAX, always.

Quick Answer

MAX returns the largest number in a list of values. It ignores empty cells, text, and logical values inside a range.

=MAX(number1, [number2], ...)

Example: =MAX(A2:A20) returns the largest number in the range. =MAX(A2:A20, 0) guarantees the result is never negative (floor at 0).

📊 MAX Practice Workbook

All 5 examples below, MAXA trap demo, LARGE comparison, and Top-N patterns — ready to open in Excel.

↓ Download .xlsx (Free)
Filebasic-aggregates-examples-2026.xlsx
Size~48 KB
Sheets9 tabs
CoversAVERAGE · MEDIAN · MIN · MAX
1985
Introduced
1–255
Arguments
100%
Compat
45+
Templates Use It

Syntax

MAX accepts between 1 and 255 arguments. Each argument can be a number, cell reference, or range.

ArgumentTypeDescription
number1 Required The first number, cell reference, or range for which you want the largest value.
number2, ... Optional Up to 254 additional numbers, references, or ranges. Useful for adding a floor value, e.g. =MAX(A2:A100, 0).

What MAX ignores inside a range: empty cells, text, and logical values (TRUE/FALSE). What it counts: zero and all negative numbers. If passed as a direct literal argument, TRUE = 1 and FALSE = 0.

5 Worked Examples

Example 01

Find the top sales rep of the quarter

The classic MAX use case — who closed the most revenue?

Sales RepQ1 Total
Emma Thompson$18,400
David Kim$22,100
Michael Chen$28,750
Sofia Rodriguez$19,900
Aisha Patel$24,200
James Wilson$15,050
=MAX(B2:B7)

Result: $28,750 — Michael Chen's quarter. Pair with INDEX/MATCH to also return the name.

Example 02

Find the most recent event date

Since Excel stores dates as serial numbers, MAX naturally returns the latest date.

EventDate
Kickoff MeetingMar 15, 2026
Design ReviewApr 08, 2026
Sprint PlanningFeb 22, 2026
Product LaunchMay 30, 2026
=MAX(B2:B5)

Result: May 30, 2026 — the latest event. Format the result cell as a date to display it correctly.

Example 03

MAXA trap with negative data — the silent 1

Monthly loss report. All losses (negative numbers). Someone accidentally typed TRUE in one cell. Watch what happens.

MonthNet (Loss)
January-$4,800
February-$3,200
MarchTRUE
April-$5,100
May-$2,900
=MAX(B2:B6) → -$2,900 ✓ correct (smallest loss) =MAXA(B2:B6) → 1 ✗ silently wrong

MAXA reads TRUE as 1. Since 1 > every negative number, the "maximum" becomes 1. Your loss report now reports a "peak" of $1 that never existed.

Example 04

Floor with MAX — enforce a minimum value

Pass a floor as an extra argument. Standard trick for enforcing "never below zero" behavior.

=MAX(A2, 0)

If A2 is 320, returns 320. If A2 is -50, returns 0. Ensures the result is never negative — great for balance columns, capped discounts, and any metric that shouldn't dip below zero.

Related pattern: to enforce a ceiling instead of a floor, use MIN: =MIN(A2, 500) caps at 500.

Example 05

Multiple ranges combined

Find the largest value across two disconnected columns — e.g. highest sale across two regions.

=MAX(A2:A50, C2:C50)

Excel merges both ranges into one pool. Same math as if you'd stacked both columns into a single column and taken MAX.

Interactive Playground

Your Data (7 values, mixed types)
A2 → -120
A3 → "pending" (text)
A4 → -45
A5 → -15
A6 → (blank)
A7 → -67
A8 → TRUE (logical)
Two Functions, Two Answers
=MAX(A2:A8)
-15

Ignores text, blank, and TRUE. Returns the largest actual number.

=MAXA(A2:A8)
1

Reads TRUE as 1. Since 1 > every negative, MAXA calls TRUE the "max."

The Basic Aggregates Family

Four functions that describe a dataset in a single number. You've now met all four.

Beyond MAX — Use LARGE for the 2nd, 3rd, or Nth Largest

MAX gives you the champion. LARGE lets you look at the podium — silver, bronze, and beyond.

FormulaReturnsResult
=MAX(A2:A10) The largest value $28,750
=LARGE(A2:A10, 1) The 1st largest (same as MAX) $28,750
=LARGE(A2:A10, 2) The 2nd largest $24,200
=LARGE(A2:A10, 3) The 3rd largest $22,100

Real-world use: podium reporting (top 3 reps), "next-best" fallback logic, and — most importantly — the array patterns below that turn LARGE into a Top-N reporting engine.

🚀 Top-N Analysis Patterns

This is where MAX + LARGE become genuinely powerful. Three patterns every analyst should know.

Pattern 01

Sum of the top 3 values

=SUM(LARGE(A2:A100, {1,2,3}))

How it works: the array constant {1,2,3} tells LARGE to return three values at once — the 1st, 2nd, and 3rd largest. SUM adds them. In Excel 365 and 2021, plain Enter works. In Excel 2016 and earlier, press Ctrl+Shift+Enter. Perfect for "top 3 salespeople contributed $X to the quarter."

Pattern 02

Average of the top 5 values

=AVERAGE(LARGE(A2:A100, {1,2,3,4,5}))

How it works: same trick, but AVERAGE instead of SUM. Returns the mean of just the top 5. Standard "elite tier" reporting — average revenue of your top-5 accounts, average time of your top-5 fastest runners.

Pattern 03

Dynamic Top-N with SEQUENCE (Excel 365)

=SUM(LARGE(A2:A100, SEQUENCE(N)))

How it works: put a number in a cell — say, N in cell E1 — and reference it: =SUM(LARGE(A2:A100, SEQUENCE(E1))). Now the "N" in "Top N" is a dial. Change E1 to 10 and get the top-10 sum instantly. This is dashboard-quality behavior.

Common Errors

ErrorCauseFix
Returns 1 unexpectedly You're using MAXA on a range that contains TRUE and only negative numbers. MAXA reads TRUE as 1 and calls it the max. Switch to MAX. It ignores logical values inside a range. This is the number-one MAXA bug.
Returns 0 unexpectedly The range is empty, or contains only text and blanks. MAX of nothing returns 0, not an error. Guard with COUNT: =IF(COUNT(range)=0, "no data", MAX(range)).
#VALUE! A directly-entered argument is a text string that can't convert to a number, e.g. =MAX("hello", 5). Remove the text argument or wrap it in VALUE() if it's a numeric string like "123".
#NAME? Function name typo: =MXA or missing closing parenthesis. Check spelling. Excel auto-suggests as you type — accept the suggestion with Tab.
#N/A propagation The range contains a cell with #N/A or another error — MAX inherits it. Fix at the source with IFERROR, or use =AGGREGATE(4, 6, range) — the "4" means MAX, the "6" means ignore errors. Works in Excel 2010+.
Wrong answer with dates Dates stored as text return the wrong result — MAX of "12/31/2025" and "01/15/2026" as text picks the wrong one. Convert to real dates first with DATEVALUE() or fix the source column's format.

📊 Practice What You Just Read

Every example, the MAXA trap, LARGE, and all three Top-N patterns — one workbook, ready to explore.

↓ Get Workbook

Related Functions

Compatibility

PlatformSupportedVersionNotes
Excel for Windows1.0+ (1985)All versions
Excel for Mac1.0+All versions
Microsoft 365CurrentFull support
Excel OnlineCurrentFull support
Excel Mobile (iOS/Android)CurrentFull support
Google SheetsAllIdentical behavior
LibreOffice CalcAllIdentical behavior

How to Use MAX — Step by Step

  1. Click an empty cell where you want the largest value to appear.
  2. Type =MAX( — Excel auto-suggests. Be careful not to pick MAXA by accident from the dropdown.
  3. Select the range of numbers, or type it manually: e.g. B2:B100.
  4. Close the parenthesis with ) and press Enter.
  5. Also return the label. If you want the name of the top row (not just the value), pair MAX with INDEX/MATCH: =INDEX(A2:A100, MATCH(MAX(B2:B100), B2:B100, 0)) returns the label from column A of the winning row.
  6. For Top-N reporting, switch to LARGE with array constants: =SUM(LARGE(range, {1,2,3})) for the top-3 sum. In Excel 2016 and earlier, press Ctrl+Shift+Enter.

Explore More Functions

📊 One More Time — Grab the Workbook

All 5 MAX examples plus AVERAGE, MEDIAN, MIN. The complete Basic Aggregates bundle in one file.

↓ Download Free

Frequently Asked Questions

What's the difference between MAX and MAXA?

MAX ignores text, empty cells, and logical values inside a range. MAXA treats text as 0, FALSE as 0, and TRUE as 1. When all your data is negative, a single TRUE inside a MAXA range silently becomes the maximum (because 1 > every negative number).

Rule: use MAX. MAXA only makes sense in very specific TRUE-as-1 scenarios, which is a design pattern almost nobody uses on purpose.

How do I return the name of the row that has the max value?

Pair MAX with INDEX/MATCH: =INDEX(A2:A100, MATCH(MAX(B2:B100), B2:B100, 0)). This looks up the position of the max in column B, then returns the label from the same row in column A.

In Excel 365, XLOOKUP is cleaner: =XLOOKUP(MAX(B2:B100), B2:B100, A2:A100). Same result, easier to read.

How do I find the max with criteria (like max sales for a specific region)?

Use MAXIFS (Excel 2019+): =MAXIFS(value_range, criteria_range, criterion). Example: =MAXIFS(B2:B100, C2:C100, "North") returns the max B where C is "North".

For Excel 2016 and earlier: =MAX(IF(C2:C100="North", B2:B100)) entered with Ctrl+Shift+Enter.

What's the difference between MAX and LARGE?

MAX returns the single largest value. LARGE returns the k-th largest — you specify the position. =LARGE(range, 1) equals =MAX(range), but =LARGE(range, 2) gives you the runner-up.

LARGE is the essential building block for Top-N reporting. Combine with SUM or AVERAGE and an array constant: =SUM(LARGE(range, {1,2,3})) for the top-3 sum.

Can MAX handle negative numbers?

Yes. MAX returns the mathematically largest value. For a range of all negatives like {-50, -10, -80}, MAX returns -10 (the one closest to zero, i.e. the largest).

This is where the MAXA trap becomes obvious — a lone TRUE in the same range would make MAXA return 1, misrepresenting the whole picture.

How does MAX handle dates?

Excel stores dates as serial numbers, so MAX naturally returns the latest date. Format the result cell as a date to display it. Text-formatted dates fail — convert with DATEVALUE() first.

MAX on a range of dates is how you find "the most recent transaction" or "the latest deadline" in a list.

How do I sum the top 3 values in a range?

Use the LARGE-array pattern: =SUM(LARGE(A2:A100, {1,2,3})). The array constant {1,2,3} asks LARGE for three values simultaneously; SUM adds them.

In Excel 365 and 2021, plain Enter works. In Excel 2016 and earlier, use Ctrl+Shift+Enter. For dynamic N, use SEQUENCE: =SUM(LARGE(A2:A100, SEQUENCE(E1))) where E1 holds the top-N value.

Does MAX count zero?

Yes. Zero is a valid number and gets considered. In a range like {-5, 0, -3}, MAX returns 0 (the largest).

To find the largest non-zero value, use =MAX(IF(range<>0, range)) as an array formula.

What if my range contains errors like #N/A?

MAX propagates errors — any cell error in the range returns that error. Two fixes: (1) fix at the source with IFERROR in the input formulas; (2) use AGGREGATE, which has built-in error handling: =AGGREGATE(4, 6, range). The "4" means MAX and the "6" means "ignore errors." Works in Excel 2010+.

Can I use MAX in conditional formatting?

Yes. Highlight the largest value with formula =A2=MAX($A$2:$A$100). Only the cell(s) matching the max get highlighted.

For Top-3 highlighting, use LARGE: =A2>=LARGE($A$2:$A$100, 3). This highlights the top three values because "greater-than-or-equal-to the third-largest" means top three.

Does MAX work across multiple sheets?

Yes. Use a 3D reference: =MAX(Sheet1:Sheet4!B2:B10) returns the max across the same range on four adjacent sheets. Or specify each range: =MAX(Sheet1!B2:B10, Sheet2!B2:B10).

The 3D syntax requires the sheets to be adjacent in the tab order. Rearranging tabs can silently break these formulas.

Is MAXIFS faster than MAX with an array formula?

Yes, noticeably. MAXIFS was introduced in Excel 2019 specifically to replace slow array-formula versions. For a range of 100,000+ cells with criteria, MAXIFS is 3–10× faster.

If you're on Excel 2016 or earlier, the array pattern still works — it's just slower on large data. On modern Excel, always prefer MAXIFS.

Never Guess "Top N" Formulas Again

Excel Wizard sits inside Excel and writes MAX, LARGE, and Top-N array formulas — with dynamic SEQUENCE, INDEX/MATCH pairings, and MAXIFS — from a plain-English prompt. AI-powered formulas, right in your ribbon.

Get Excel Wizard Add-in →