# MAX function in Excel

> MAX returns the largest number from a list of values or ranges: the top sale, the latest date, the highest temperature.

Source: https://spreadsheetpractice.com/functions/max · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

## Quick answer

- **What it does:** MAX returns the largest number from a list of values or ranges: the top sale, the latest date, the highest temperature.
- **Syntax:** `=MAX(number1, [number2], ...)`
- **Most common use:** `=MAX(B2:B5)` returns 340 (The item with the most units on hand)
- **Available in:** Every current version
- **Category:** [Statistical functions](https://spreadsheetpractice.com/functions/category/stats)
- **Returns:** The largest number, or 0 if the ranges contain no numbers.
- **Google Sheets:** Also available in Google Sheets.

## What it does

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.

## Syntax

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

| Argument | Required? | What it is |
|---|---|---|
| `number1` | Required | The first number, cell or range to check. |
| `number2` | Optional | More numbers, cells or ranges, up to 255 in total. |

## Examples

Each result was calculated by running the formula on the sample sheet.

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

### The sample sheet

Every formula above runs on this data:

|  | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| 1 | Item | On hand | Reorder point |  | Check | Result |
| 2 | Paper | 120 | 80 |  | Most stock | 340 |
| 3 | Toner | 6 | 10 |  | Highest reorder point | 150 |
| 4 | Pens | 340 | 150 |  | Toner to order | 4 |
| 5 | Folders | 45 | 60 |  |  |  |

## Common mistakes

| What you see | Why, and how to fix it |
|---|---|
| MAX returns 0 | There are no numbers in the range, often because they were imported as text. |
| A negative result where you wanted zero | Wrap the calculation as MAX(0, calculation) so anything below zero becomes 0. |
| The result ignores a filter | MAX 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.

## Related functions

- [MIN](https://spreadsheetpractice.com/functions/min): MIN returns the smallest number from a list of values or ranges.
- [MAXIFS](https://spreadsheetpractice.com/functions/maxifs): MAXIFS returns the largest value among the rows that meet one or more conditions: the biggest deal in a region, the latest order date for a customer.
- [LARGE](https://spreadsheetpractice.com/functions/large): LARGE returns the k-th largest value in a range: k = 1 is the largest, 2 the second largest, and so on.

## 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).

## Practice

A graded MAX exercise ("Average, best and worst") is on [the MAX page](https://spreadsheetpractice.com/functions/max). It is checked instantly, then re-checked on changed data.

Lessons that use MAX:

- [Lesson 2: SUM, AVERAGE, MIN, MAX & COUNT](https://spreadsheetpractice.com/learn/sum-average-min-max-count)
- [Lesson 34: RANK, LARGE & SMALL](https://spreadsheetpractice.com/learn/rank-large-small) (Pro)

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
