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.
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.
MAXA = 120
MAXA = 80
MAXA = 80
MAXA = 1
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.
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.
Syntax
MAX accepts between 1 and 255 arguments. Each argument can be a number, cell reference, or range.
| Argument | Type | Description |
|---|---|---|
| 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
Find the top sales rep of the quarter
The classic MAX use case — who closed the most revenue?
| Sales Rep | Q1 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 |
Result: $28,750 — Michael Chen's quarter. Pair with INDEX/MATCH to also return the name.
Find the most recent event date
Since Excel stores dates as serial numbers, MAX naturally returns the latest date.
| Event | Date |
|---|---|
| Kickoff Meeting | Mar 15, 2026 |
| Design Review | Apr 08, 2026 |
| Sprint Planning | Feb 22, 2026 |
| Product Launch | May 30, 2026 |
Result: May 30, 2026 — the latest event. Format the result cell as a date to display it correctly.
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.
| Month | Net (Loss) |
|---|---|
| January | -$4,800 |
| February | -$3,200 |
| March | TRUE |
| April | -$5,100 |
| May | -$2,900 |
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.
Floor with MAX — enforce a minimum value
Pass a floor as an extra argument. Standard trick for enforcing "never below zero" behavior.
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.
Multiple ranges combined
Find the largest value across two disconnected columns — e.g. highest sale across two regions.
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)
A3 → "pending" (text)
A4 → -45
A5 → -15
A6 → (blank)
A7 → -67
A8 → TRUE (logical)
Two Functions, Two Answers
Ignores text, blank, and TRUE. Returns the largest actual number.
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.
| Formula | Returns | Result |
|---|---|---|
=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.
Sum of the top 3 values
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."
Average of the top 5 values
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.
Dynamic Top-N with SEQUENCE (Excel 365)
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
| Error | Cause | Fix |
|---|---|---|
| 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.
Related Functions
Compatibility
| Platform | Supported | Version | Notes |
|---|---|---|---|
| Excel for Windows | ✓ | 1.0+ (1985) | All versions |
| Excel for Mac | ✓ | 1.0+ | All versions |
| Microsoft 365 | ✓ | Current | Full support |
| Excel Online | ✓ | Current | Full support |
| Excel Mobile (iOS/Android) | ✓ | Current | Full support |
| Google Sheets | ✓ | All | Identical behavior |
| LibreOffice Calc | ✓ | All | Identical behavior |
How to Use MAX — Step by Step
- Click an empty cell where you want the largest value to appear.
- Type
=MAX(— Excel auto-suggests. Be careful not to pick MAXA by accident from the dropdown. - Select the range of numbers, or type it manually: e.g.
B2:B100. - Close the parenthesis with
)and press Enter. - 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. - 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.
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.
Templates That Use MAX
Sales Dashboard
Top-performing rep, biggest deal, latest close. MAX and LARGE power the "who's winning" section end to end.
USES MAXKPI Dashboard
Peak revenue day, highest satisfaction score, longest streak. Every KPI has a "record" and MAX finds it.
USES MAXLeaderboard Template
Podium reporting — top 3, top 10 — built on LARGE. Ranked automatically as data updates.
USES MAXBudget Tracker
Highest spending category, biggest single expense. MAX turns your budget into a red-flag scanner.
USES MAXInventory Tracker
Peak stock level per SKU, largest order, most-recent restock date. MAX everywhere across an ops sheet.
USES MAXEmployee Attendance
Perfect attendance rows, most days present per month, longest streak. MAX handles the "best" side of the tracker.
USES MAXProject Timeline
Latest task end date across the project — the true finish line. MAX of the "end" column tells you when everything wraps.
USES MAXStock Portfolio Tracker
All-time high per holding, best day of the year, top gainer. LARGE with array constants for Top-5 holdings.
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 →