MAX Function
The Excel MAX function returns the largest numeric value in its arguments. It works across cells and ranges while ignoring referenced blanks and text.
| Excel MAX Function | |||||||
| Change the cream values to see how MAX identifies the greatest numeric value across different reference patterns. | |||||||
| Source data, editable | MAX examples | ||||||
| Observation | Primary Value | Comparison Value | Data Note | Example | Formula syntax | Result | |
| Observation 1 | 42 | -5 | Numeric values | Complete primary range | =MAX(B12:B21) | 100 | |
| Observation 2 | 18 | -20 | Numeric values | Selected cells only | =MAX(B12,B15,B18,B21) | 100 | |
| Observation 3 | 95 | -3 | Highest in first block | Two separate ranges | =MAX(B12:B16,C12:C16) | 95 | |
| Observation 4 | 0 | -12 | Zero remains valid | All-negative range | =MAX(C12:C16) | -3 | |
| Observation 5 | -12 | -9 | All-negative comparison block | ||||
| Observation 6 | 110 | Blank primary value | How to interpret the maximum | ||||
| Observation 7 | 78 | Blank comparison value | MAX compares numeric values and ignores referenced blanks and text. | ||||
| Observation 8 | Pending | n/a | Text values are ignored | Zero is greater than every negative number and remains a valid candidate. | |||
| Observation 9 | 65 | 0 | Zero remains valid | For an all-negative range, the maximum is the value closest to zero. | |||
| Observation 10 | 100 | 75 | Primary range maximum | ||||
| Reliability checks | |||||||
| Primary-range result matches the eight explicitly numeric source cells | OK | ||||||
| Negative-only result matches the five-cell comparison block | OK | ||||||
Overview
The Excel MAX function finds the greatest numeric value among its arguments. It can compare one range, selected cells, several ranges, or a mixture of numeric sources.
Quick reference
Syntax: =MAX(number1, [number2], ...)
Returns: The greatest numeric value supplied, or zero when no numeric values are present. (number)
Arguments:
number1(required) — The first number, cell reference, range, or array to compare.number2(optional) — An additional number, cell reference, range, or array; more optional arguments may follow.
The bracketed arguments after number1 are optional. Add further values, references, ranges, or arrays when they belong to the same set being evaluated for its highest numeric value.
Common uses
- Find the highest sales value, score, balance, temperature, or capacity reading.
- Return the latest date from valid Excel dates.
- Compare peaks across several separate ranges.
- Identify the greatest value in a negative-only series.
Calculations
MAX compares the numeric values in all supplied arguments and returns the greatest one. A colon defines a contiguous range, while commas combine selected cells or separate ranges.
Referenced blank cells, text, and logical values are ignored. Zero and negative numbers remain valid candidates. In an all-negative set, the maximum is the value closest to zero, not the value with the greatest absolute magnitude.
Excel stores dates and times as serial numbers, so MAX can return the latest true date or the greatest numeric duration. If no numeric values are supplied, it returns zero; if a referenced range contains an error, that error propagates.
Function behavior
Situation | Behavior |
|---|---|
Blank cells | Ignored in referenced ranges. |
Text in referenced cells | Ignored. |
Logical values in referenced cells | Ignored. |
Zero | Included as a candidate and is greater than any negative number. |
All-negative values | Returns the least negative value—the one closest to zero. |
No numeric values | Returns |
Errors | A referenced error propagates to the result. |
Common errors
Confusing maximum with absolute magnitude
What happens:
In an all-negative range, a more extreme value such as -20 is mistaken for the maximum instead of -3.
Better approach:
Compare signed values on the number line. Use an absolute-value method only when magnitude is the real question.
Treating zero as missing
What happens:
Zero remains eligible and becomes the maximum whenever all other numeric values are negative.
Better approach:
Define whether zero is a valid observation. If it should be excluded, use criteria-based logic such as MAXIFS.
Using MAX for the second- or third-largest value
What happens:MAX can return only the single greatest value.
Better approach:
Use LARGE with the required rank.
Accepting zero when no numbers exist
What happens:
The result can look like a genuine observed maximum even though the source contains no numeric values.
Better approach:
Check the range with COUNT when the presence of numeric data is uncertain.
Example
Example 1 — Find the Maximum in a Range
=MAX(B12:B21)
The sample range includes eight numbers, one blank, and one text value. MAX ignores the nonnumeric cells and returns 100.
Example 2 — Compare Selected Cells
=MAX(B12,B15,B18,B21)
Only the four named cells contribute. Their values are 42, 0, 78, and 100, so the result is 100.
Example 3 — Compare Multiple Ranges
=MAX(B12:B16,C12:C16)
Excel treats both five-cell blocks as one comparison set. The greatest numeric value across them is 95.
Example workbook
The workbook contains MAX Example and Notes tabs. Four live examples cover a complete range, selected cells, two ranges, and an all-negative block. Two checks reconcile the primary-range and negative-only results against explicit source cells.
Key takeaway
MAX returns the greatest signed numeric value, so zero and negatives remain candidates while referenced blanks and text are ignored.