MAX Function in Google Sheets (Syntax and Examples)

MAX returns the largest numeric value in Google Sheets. You can compare a range, several ranges, or numbers typed directly into the formula.

Use it to find a highest score, a largest sale, or the top value among matching records. Text and genuinely empty cells in a range do not become candidate numbers.

MAX function syntax

=MAX(value1, [value2, ...])
  • value1: the first number or range to compare.
  • value2 and later arguments: optional additional numbers or ranges.

The Google MAX reference describes the function arguments.

Example data

Enter this dataset starting in A1. Leave cells marked “leave empty” empty; type any displayed formula as a formula. Keep a separate blank area for the results.

ItemScoreGroup
A74East
B88West
C0East
D95East
EAbsentWest
F(leave empty)East

The examples below use this dataset unless the formula supplies its own values. Array results need enough empty cells to expand. The formulas use commas as argument separators. Your spreadsheet locale may require semicolons.

Find the highest value in a column

The largest numeric score is 95. Absent and the empty cell are ignored; the recorded zero remains a valid numeric score.

=MAX(B2:B7)

Result: 95

MAX formula and its calculated result beside the bordered example data.

Compare a grid or separate numbers

MAX examines every number in this two-row array. The largest value is 450.

=MAX({120,140;90,450})

Result: 450

You can also list numbers directly as separate arguments.

=MAX(5,12,3,8)

Result: 12

Negative values work normally. Of -10 and -3, -3 is larger.

=MAX(-10,-3)

Result: -3

Find the largest value that meets a condition

FILTER keeps East records, and MAX returns the highest score in that subset.

=MAX(FILTER(B2:B7,C2:C7="East"))

Result: 95

MAXIFS expresses this single condition directly. Keep its value and criteria ranges aligned.

=MAXIFS(B2:B7,C2:C7,"East")

Result: 95

Calculate the difference between highest and lowest

Subtract MIN from MAX to calculate the numeric range of these scores. The zero score is included, so the difference is 95.

=MAX(B2:B7)-MIN(B2:B7)

Result: 95

Handle a range without usable numbers

When the referenced range contains only product labels, MAX returns 0. That does not prove a zero was present in the source.

=MAX(A2:A7)

Result: 0

An error inside the input propagates. Repair or deliberately filter invalid entries instead of assuming MAX ignores every nonnumeric cell.

=MAX({1;NA();3})

Result: #N/A

Other Google Sheets articles you may also like