Example 1
Highest value in a column
B10 =MAX(B2:B8)
Result: 27
Thursday's 27 is the largest of the seven readings.
B10 =MAX(B2:B8) returns 27
Returns the largest number in the values you give it. Text and blanks are ignored, and with no numbers it returns 0.
Syntax
=MAX(, [number2], ...)
All versions of Excel, including Excel for Microsoft 365 and Excel for the web.
Try it
Edit the formula in B10 or change the inputs. The sheet recalculates as you type.
B10 =MAX(B2:B8) returns 27
MAX returns the biggest number it finds. Use it for the highest sale, the latest date, the peak load, or as a "no less than" floor inside a calculation.
In a range or cell reference MAX considers only numbers, and dates count as numbers. It ignores:
Numbers and logical values typed straight into the formula are used: =MAX(5,TRUE) returns 5, and =MAX(-5,TRUE) returns 1. If an argument contains an error value, such as #N/A, MAX returns that error.
If there are no numbers at all, MAX returns 0, not an error. That can be misleading: a range of text gives 0, which looks like a real result. Check the range with COUNT if that matters.
The biggest value in a list. =MAX(B2:B8) returns the highest of seven values. Add more ranges to search several areas at once, such as =MAX(B2:B8,D2:D8).
The latest date. Dates are numbers, so =MAX(A2:A50) returns the most recent date. Format the cell as a date to read it.
A floor. =MAX(0, target - on_hand) returns the shortfall, but never goes below zero. The second argument sets the lowest value the formula can return. Its partner is MIN, which sets a ceiling.
MAX returns the value, not its label. To get the label, match the maximum back to the list: =INDEX(A2:A8, MATCH(MAX(B2:B8), B2:B8, 0)), or in Microsoft 365, =XLOOKUP(MAX(B2:B8), B2:B8, A2:A8). If two rows tie, both formulas return the first.
MAX has no conditions. To find the largest value that meets a test, such as the highest sale in one region, use MAXIFS. To find the second or third largest, use LARGE. To find the smallest value, use MIN.
MAXA is a variant that counts TRUE as 1 and text as 0 in ranges. It is rarely what you want for ordinary numeric data.
B2:B8.MAX(0,B2).Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
B10 =MAX(B2:B8)
Result: 27
Thursday's 27 is the largest of the seven readings.
B10 =MAX(B2:B8) returns 27
Example 2
B4 =MAX(0,B1-B2)
Result: 0
There are 30 units more than the target, so the raw difference is -30. MAX(0, ...) turns that into 0 instead of a negative order.
B4 =MAX(0,B1-B2) returns 0
Example 3
B6 =MAX(B2:B4)
Result: 12-Feb-2025
Excel stores dates as numbers, so MAX returns the largest serial number, 45700, which displays as 12-Feb-2025.
B6 =MAX(B2:B4) returns 12-Feb-2025
Example 4
B5 =MAX(B2:B3)
Result: 0
There are no numbers in the range, so MAX returns 0, not an error. Use COUNT(B2:B3) to check whether any numbers were found.
B5 =MAX(B2:B3) returns 0
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In B10, return the highest Q1 sales figure.
Answer in B10.
COUNT or wrap the formula in an IF.#N/A, makes MAX return that error. Fix the source cell or use AGGREGATE with option 6 to ignore errors.MAX(IF(...)) works in Microsoft 365 but needs Ctrl+Shift+Enter in older versions; MAXIFS is simpler.Use MAXIFS: `=MAXIFS(C2:C9,A2:A9,"East")` returns the largest value in column C where column A is East. It needs Excel 2019 or Microsoft 365.
Use `=INDEX(A2:A8,MATCH(MAX(B2:B8),B2:B8,0))`, or in Microsoft 365 `=XLOOKUP(MAX(B2:B8),B2:B8,A2:A8)`. Both return the first name when values tie.
Either the largest value is 0, or the range has no numbers in it. Numbers stored as text are not counted, so convert them first.
MAX returns the single largest value. LARGE returns the nth largest, such as the second or third, so `=LARGE(B2:B8,1)` equals `=MAX(B2:B8)`.
MAX is taught in Excel foundations, lesson 6: AVERAGE, MIN and MAX. Each lesson is a short, graded exercise like the one above.