Summary

The Excel MAX function returns the largest numeric value in the data provided. MAX ignores empty cells, the logical values TRUE and FALSE, and text values.

Purpose 

Get the largest value

Return value 

The largest value in supplied data

Arguments 

  • number1 - Number, reference to numeric value, or range that contains numeric values.
  • number2 - [optional] Number, reference to numeric value, or range that contains numeric values.

Syntax 

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

Usage notes 

The MAX function returns the largest numeric value in the data provided. The MAX function can be used to return the largest value from any type of numeric data. For example, MAX can return the slowest time in a race, the latest date, the largest percentage, the highest temperature, or the top sales number. 

The MAX function takes multiple arguments in the form number1, number2, number3, etc. up to 255 total. Arguments can be a hardcoded constant, a cell reference, or a range, in any combination. MAX ignores empty cells, text values, and the logical values TRUE and FALSE.

Examples

The MAX function returns the largest numeric value in supplied data:

=MAX(12,17,25,11,23) // returns 25

The MAX function can accept values as separate arguments or in ranges or arrays:

=MAX(5,10)
=MAX(A1,A2,A3)
=MAX(A1:A10)
=MAX(A1:A10,C1:C10)

MAX ignores logical values and numbers entered as text, unless they are provided as arguments:

=MAX(-1,TRUE) // returns 1
=MAX(-1,TRUE,"3") // returns 3

To return the maximum value with criteria, use the MAXIFS function. To retrieve the nth largest value in a data set, use the LARGE function. To determine the rank of a number in a set of data, use the RANK function.

Notes

  • Arguments can be provided as numbers, names, arrays, or references.
  • MAX accepts up to 255 arguments. If arguments contain no numbers, MAX returns 0.
  • MAX ignores empty cells, text values, and TRUE and FALSE in references.
  • MAX will evaluate numbers as text and logical values supplied directly as arguments.
  • To include logical values in a reference, see the MAXA function.
Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.