Going Stellar

Home/Google Sheets reference

Google Sheets function · Statistical

MAX in Google Sheets: syntax and examples

MAX scans numbers and returns the largest. It accepts several ranges and plain values at once. Text inside a range is skipped, so a column with notes does not break it.

Syntax

MAX(value1, [value2, ...])

Arguments

ArgumentTypeRequiredWhat it does
value1anyyesThe first number or range.
value2, ...anynoMore numbers or ranges.

Examples

The examples use this table, starting in A1:

ProductPriceStock
Lamp79.912
Chair5490
Stand129.57
Tray3440
=MAX(B2:B5)

Result: 549

The highest price in the column.

Run in a Google Sheet (English US locale) on .

=MAX(B2:C5)

Result: 549

A two-column block: the largest number anywhere in it.

Run in a Google Sheet (English US locale) on .

=MAX(B2:B5, 600)

Result: 600

Mix a range and a fixed number. Useful as a floor or a cap.

Run in a Google Sheet (English US locale) on .

=INDEX(A2:A5, MATCH(MAX(B2:B5), B2:B5, 0))

Result: Chair

MAX gives the value; MATCH and INDEX give the product that owns it.

Run in a Google Sheet (English US locale) on .

=MAX(A2:A5)

Result: 0

A range with only text returns 0, not an error.

Run in a Google Sheet (English US locale) on .

Common errors

  • A range with no numbers returns 0, not an error. A 0 can therefore mean "no data".
  • Text typed directly as an argument, as in MAX("abc"), returns #VALUE!. Text inside a range is ignored.
  • MAX returns the value, not its position. Use MATCH with INDEX to get the matching row.

Compared with Excel

Same syntax in Excel.

Sources

  1. MAX (Docs Editors Help)

Markdown version · All functions