How to Use the MAXIFS Function in Google Sheets

By Tomosuke Hasegawa · Updated Oct 29, 2026 · Intermediate · 5 min read · includes 2 free exercises

In short: MAXIFS returns the maximum value in a range for the rows that meet every condition. The formula is =MAXIFS(range, criteria_range1, criterion1, [criteria_range2, criterion2, ...]).

What MAXIFS does

MAX finds the largest number in a range, with no conditions. MAXIFS adds conditions: "the highest sale in the East region", or "the highest score among rows with quantity under 3". Like AVERAGEIFS and SUMIFS, it starts with the range to evaluate and then takes pairs of criteria range and criterion. A MINIFS function works the same way for the smallest value.

MAXIFS syntax

=MAXIFS(range, criteria_range1, criterion1, [criteria_range2, criterion2, ...])

Per Google's help page, MAXIFS returns 0 if none of the criteria are satisfied, and all ranges must be the same size, otherwise the function returns a #VALUE error. A 0 result therefore does not always mean the real maximum is 0.

A step-by-step example

Here are four rows of region, sales and quantity in cells A1:C5.

ABC
1RegionSalesQty
2East101
3West202
4East303
5West404
=MAXIFS(B2:B5, A2:A5, "East")

This returns 30, the larger of the two East sales (10 and 30). With a second condition:

=MAXIFS(B2:B5, A2:A5, "East", C2:C5, "<3")

This returns 10. Here is why: only the first row is East with a quantity below 3, so 10 is the only candidate.

Common mistakes

Try it yourself

Use the table above (A1:C5). Type your formula into the box, starting with =, then press Check.

Exercise 1: Biggest East sale

Write a formula that returns the largest value in B2:B5 for the rows where the region in A2:A5 is East.

Hint: range first, then criteria range and criterion.

Exercise 2: Two conditions

Write a formula that returns the largest value in B2:B5 for East rows where the quantity in C2:C5 is less than 3.

Hint: add a second range and condition.

What to learn next

Syntax and rules in this guide were checked against Google's MAXIFS help page. See all guides.