WorkbookLogic
FunctionStatisticalbeginnerMAXIF

MAX Function

By WorkbookLogic

The Excel MAX function returns the largest numeric value in its arguments. It works across cells and ranges while ignoring referenced blanks and text.

ExcelLast reviewed Sep 11, 2026
max-function-v1.0.0.xlsx
Excel MAX Function
Change the cream values to see how MAX identifies the greatest numeric value across different reference patterns.
Source data, editableMAX examples
ObservationPrimary ValueComparison ValueData NoteExampleFormula syntaxResult
Observation 142-5Numeric valuesComplete primary range=MAX(B12:B21)100
Observation 218-20Numeric valuesSelected cells only=MAX(B12,B15,B18,B21)100
Observation 395-3Highest in first blockTwo separate ranges=MAX(B12:B16,C12:C16)95
Observation 40-12Zero remains validAll-negative range=MAX(C12:C16)-3
Observation 5-12-9All-negative comparison block
Observation 6110Blank primary valueHow to interpret the maximum
Observation 778Blank comparison valueMAX compares numeric values and ignores referenced blanks and text.
Observation 8Pendingn/aText values are ignoredZero is greater than every negative number and remains a valid candidate.
Observation 9650Zero remains validFor an all-negative range, the maximum is the value closest to zero.
Observation 1010075Primary range maximum
Reliability checks
Primary-range result matches the eight explicitly numeric source cellsOK
Negative-only result matches the five-cell comparison blockOK

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 0, which may be mistaken for a real observation.

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.