Spreadsheet Practice

MAX function

MAX returns the largest number from a list of values or ranges: the top sale, the latest date, the highest temperature. With a 0 as one of its arguments it also acts as a floor, which is the standard way to stop a calculation from going negative.

Available in
Every current version
Category
Statistical functions
Returns
The largest number, or 0 if the ranges contain no numbers.
Google Sheets
Also available in Google Sheets.

Syntax

=MAX(number1, [number2], ...)

ArgumentRequired?What it is
number1RequiredThe first number, cell or range to check.
number2OptionalMore numbers, cells or ranges, up to 255 in total.

Examples

Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.

CellFormulaResultWhat it shows
F2=MAX(B2:B5)340The item with the most units on hand
F3=MAX(C2:C5)150The highest reorder point
F4=MAX(0,C3-B3)4Units of toner to order, never below zero

Try it live

This is the sample sheet. Change any number or text, or edit a formula, and the results update.

Show the sample data as a table
ItemOn handReorder pointCheckResult
Paper12080Most stock340
Toner610Highest reorder point150
Pens340150Toner to order4
Folders4560

Practice MAX

From lesson 2, SUM, AVERAGE, MIN, MAX & COUNT. Graded instantly, then re-checked on changed data.

Average, best and worst

Fill in E3 (average daily sales), E4 (best day) and E5 (worst day), each from B2:B8.

Common mistakes

What you seeWhy, and how to fix it
MAX returns 0There are no numbers in the range, often because they were imported as text.
A negative result where you wanted zeroWrap the calculation as MAX(0, calculation) so anything below zero becomes 0.
The result ignores a filterMAX looks at hidden rows too. Use AGGREGATE or SUBTOTAL if you need the max of visible rows only.

Tips

  • MAXIFS finds the largest value that meets one or more conditions.
  • MAX on a date column returns the most recent date.

Questions

How do I get the second-highest value?

Use =LARGE(B2:B5,2). MAX only returns the single largest.

How do I return the name next to the max value?

Combine with a lookup: =XLOOKUP(MAX(B2:B5),B2:B5,A2:A5).

Lessons that use MAX

Last reviewed October 2026. Every example result on this page is calculated live by the Spreadsheet Practice formula engine.