MAX function
MAX returns the largest number in the values you supply, such as the top sale or latest date. It is one of the most used summary functions.
Example
Read it as a sentence: find the largest number in A1:A8, which gives 9.
Excel shows 9
A
1
2
2
4
3
4
4
4
5
5
6
5
7
7
8
9
Data
Syntax
MAX(number1, [number2], ...)
Arguments in [square brackets] are optional.
-
number1(required) - First number, cell reference or range.
-
number2(optional) - Further numbers or ranges, up to 255 arguments.
Returns: The largest number in the supplied values.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=MAX({2,4,4,4,5,5,7,9}) | 9 | Array constant |
=MAX(10,"20",TRUE) | 20 | Direct args: number, text-number, TRUE |
=MAX(5) | 5 | Single number |
=MAX({1,"2",TRUE,3}) | 3 | Array with text and boolean |
=MAX("1/1/2024") | 45292 | Date text arg |
=MAX(Data!A1:A8) | 9 | Range of numbers |
=MAX(10,"abc") | #VALUE! | Direct arg: non-numeric text |
=MAX(1,NA()) | #N/A | Error direct arg |
The Data sheet these formulas read
A cell that starts with = holds that formula.
A
1
2
2
4
3
4
4
4
5
5
6
5
7
7
8
9
Data
Watch out for
- Ignores text and TRUE/FALSE inside ranges; use MAXA to count them.
- Returns 0 if there are no numbers at all.
- Errors in the data cause the result to be that error.
Where it works
- Excel
- MAX is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Statistical functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .