How to Use COUNTIFS in Google Sheets

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

In short: COUNTIFS counts the rows that meet all of several conditions. The formula is =COUNTIFS(criteria_range1, criterion1, [criteria_range2, criterion2, ...]).

What COUNTIFS does

COUNTIF counts with one condition. COUNTIFS counts with as many as you need, such as "how many tasks belong to Ann and are Done?" Only rows that pass every test are counted.

COUNTIFS syntax

=COUNTIFS(criteria_range1, criterion1, [criteria_range2, criterion2, ...])

Google's help page says every additional range must have the same number of rows and columns as the first range.

A step-by-step example

Here is the task list in cells A1:D8.

ABCD
1TaskOwnerStatusHours
2Write reportAnnDone3
3Fix bugBenOpen5
4Send invoiceAnnDone2
5Plan tripCaraOpen6
6Update docsBenDone4
7Review PRAnnOpen1
8Test appBenDone8

To count Ann's tasks that are Done:

=COUNTIFS(B2:B8, "Ann", C2:C8, "Done")

This returns 2. Here is why:

  1. Ann owns rows 2, 4 and 7.
  2. Of those, rows 2 and 4 are Done.
  3. Two rows pass both tests, so the result is 2.

Combine text and number tests

To count Done tasks that took more than 2 hours:

=COUNTIFS(C2:C8, "Done", D2:D8, ">2")

This returns 3 (the 3, 4 and 8 hour tasks). The operators =, <>, >, >=, < and <= work as they do in COUNTIF. To compare with a cell, join it with an ampersand: ">"&F1.

Common COUNTIFS mistakes

Try it yourself

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

Exercise 1: Owner and status

Write a formula that counts the tasks where the Owner is Ann and the Status is Done.

Hint: pair B2:B8 with "Ann", then C2:C8 with "Done".

Exercise 2: Done and long

Write a formula that counts the Done tasks that took more than 2 hours (column D).

Hint: the second criterion is the text ">2".

What to learn next

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