SheetsLessons
Math & Counting function

MAX function in Google Sheets

MAX returns the largest number in a set of values, such as the top score, the highest price or the latest result.

Syntax

=MAX(value1, [value2, ...])
value1
A number, cell or range.
value2, ...
Optional. More values or ranges.

Practice MAX

Task 1 of 2

What is the most expensive listing? Answer in D2.

D2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

MAX examples

Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.

ABCDE
1RepRegionProductUnitsRevenue
2AvaWestMonitor12$2,400.00
3LiamEastKeyboard30$1,500.00
4MayaWestMouse45$900.00
5NoahNorthMonitor8$1,600.00
6ZaraEastMonitor15$3,000.00
7OmarWestKeyboard22$1,100.00
Sales by rep
FormulaResultWhat it shows
=MAX(E2:E7)$3,000.00Highest revenue.
=MAX(D2:D7)45Most units sold.
=MAX(E2:E7) - MIN(E2:E7)$2,100.00The spread between best and worst.
=INDEX(A2:A7, MATCH(MAX(E2:E7), E2:E7, 0))ZaraWho had the highest revenue?

Tips and common mistakes

  • Text and blanks are ignored. If there are no numbers, MAX returns 0.
  • Use LARGE for the 2nd, 3rd or nth largest value.
  • A common pattern is capping a value with MIN and flooring it with MAX, e.g. =MAX(0, B2-C2) never goes below zero.

Related functions