MAX Function in Google Sheets
Returns the largest numeric value in a range or set of arguments. Used for peaks, ceilings, and bounding values.
Syntax
MAX(value1, [value2, ...])Returns: The largest number among the arguments. Text and blanks are ignored.
Excel equivalent: MAX (identical)
Parameters
| Name | Required | Description |
|---|---|---|
| value1, value2, ... | Required | Numbers, ranges, or expressions to find the maximum of. |
Examples
Highest sale in a column
=MAX(B2:B1000)Returns the largest number in B2:B1000.
Cap a value at a ceiling
=MIN(A2, 1000)Returns A2 if it's ≤ 1000, otherwise 1000. The MIN of a value and a ceiling is the classic way to enforce a cap.
Floor a negative number at zero
=MAX(A2, 0)Returns A2 if it's ≥ 0, otherwise 0. Equivalent to "don't go below zero".
When to use an alternative
- MAXIFS — You want the max only for rows matching one or more conditions.
- LARGE — You want the Nth largest value (LARGE(range, 1) = MAX).
- QUERY with ORDER BY DESC LIMIT 1 — You want the row metadata alongside the max value.
Common errors and how to fix them
Returns 0 unexpectedly
Cause: Range contains all text or all blanks — MAX defaults to 0.
Fix: Verify the range actually has numbers; use COUNTA first to validate.
Wrong max
Cause: Numbers stored as text — MAX silently skips them.
Fix: Look for left-aligned cells. Use VALUE() to convert, or use MAXA which treats text as 0.
Related functions
Frequently Asked Questions
What does MAX return when the range is empty?
MAX returns 0 when given an empty range or all-text range, not an error. If you want to detect "no numbers" specifically, check with COUNT(range) first.
Can MAX work across multiple sheets?
Yes, just pass each sheet's range as a separate argument: MAX(Q1!B:B, Q2!B:B, Q3!B:B, Q4!B:B) returns the largest value across all four sheets.