MAX
Returns the largest value in a set of values.
=MAX(number1, [number2], ...)This static page keeps the function indexed for search, while the spreadsheet app handles interactive exploration and saved formulas.
What the function does
Overview
Returns the largest value in a set of values.
The MAX function is a statistical tool used to identify the largest numeric value within a provided dataset. It accepts up to 255 individual arguments, which can be numbers, cell references, ranges, or arrays. Critically, when a range or reference is used, MAX automatically ignores empty cells, logical values (TRUE/FALSE), and text. However, if values are typed directly into the function arguments, logical values and text representations of numbers are evaluated. Best practices involve using MAX with date columns to find the most recent entry, as Excel treats dates as serial integers. One significant edge case is error handling: if any cell in the referenced range contains an error value (e.g., #REF!), MAX will propagate that error. If the input contains no numbers at all, the function returns 0. To find the largest value while ignoring errors or hidden rows, consider using the AGGREGATE function instead.
Quick reference
Syntax
=MAX(number1, [number2], ...)
Inputs
Arguments
Example: A2:A100
Formula patterns
Examples
Find the highest sales figure in a column
=MAX(B2:B50)Determine the most recent project deadline
=MAX(C2:C100)Compare multiple ranges against a static threshold
=MAX(A2:A10, D2:D10, 500)Avoid these issues
Common Errors
#VALUE!
Cause: Occurs if a text string is supplied directly as an argument and cannot be interpreted as a number.
Fix: Ensure that any hard-coded arguments are numeric or that you are referencing cells containing numeric data.
Error Propagation
Cause: If the referenced range (e.g., A2:A10) contains an existing error such as #N/A or #DIV/0!, MAX will return that error.
Fix: Clean the source data using IFERROR or use =AGGREGATE(4, 6, A2:A10) to find the maximum while ignoring error values.
Platform support
Compatibility
Source: Microsoft Support
Common questions
Frequently Asked Questions
Returns the largest value in a set of values.
number1: Range to check
#VALUE!: Ensure that any hard-coded arguments are numeric or that you are referencing cells containing numeric data. Error Propagation: Clean the source data using IFERROR or use =AGGREGATE(4, 6, A2:A10) to find the maximum while ignoring error values.