What is COUNTIF in Google Sheets?

COUNTIF returns how many cells in a range meet a single criterion. It powers KPI tiles like open ticket count, rows flagged Yes, or cells above a quota. The criterion follows the same string, comparison, and wildcard rules as SUMIF.

When to use it

Use COUNTIF for tallies: how many orders are Pending, how many scores passed, or how many emails contain @company.com.

When to skip it

Skip COUNTIF when you need multiple AND conditions across columns. Use COUNTIFS. When you need to sum values instead of counting rows, use SUMIF.

How it works

  1. 1

    Point COUNTIF at one range to search, such as status column F2:F500.

  2. 2

    Set criterion as exact text, comparison, cell reference, or wildcard pattern.

  3. 3

    COUNTIF counts cells in the range where the test is TRUE.

  4. 4

    Blank criterion behavior differs from counting blanks explicitly with "".

  5. 5

    Use COUNTIF on numeric ranges with comparisons like ">50" for threshold counts.

  6. 6

    Combine several COUNTIF calls when you need OR logic across different values.

Examples in Google Sheets

Count open tasks

=COUNTIF(E2:E, "Open") returns how many rows in column E still show Open.

Count passing grades

=COUNTIF(C2:C, ">=70") counts scores at or above the pass line.

Count non-empty IDs

=COUNTIF(A2:A, "<>") counts rows where column A is not blank.

Build this without starting from a blank cell

Use a Better Sheets tool for COUNTIF, then watch a walkthrough when you want the full pattern.

Better Sheets resources

Common mistakes

  • Hidden spaces in source data so "Done" does not match Done.
  • Using COUNTIF on one column when the rule should test two columns. Switch to COUNTIFS.
  • Expecting COUNTIF to sum values. It only counts how many cells match.
  • Case sensitivity surprises on mixed-case labels without UPPER cleanup.
  • Counting whole column F:F forever on a 100k row sheet when a bounded range is enough.

Frequently asked questions

COUNTIF vs COUNTA?
COUNTA counts non-empty cells regardless of value. COUNTIF counts only cells matching your rule.
COUNTIF blank cells?
Use criterion "" to count blanks or "<>" to count non-blanks in the range.
COUNTIF with dates?
Compare to DATE or a date cell. Text that looks like a date may not match.
COUNTIF vs COUNTIFS?
COUNTIF is one test on one range. COUNTIFS requires every paired range and criterion to match.
Wildcards in COUNTIF?
Yes. * matches any run of characters and ? matches one character inside quotes.
COUNTIF on checkboxes?
Use TRUE or FALSE as the criterion for checkbox columns.
Why COUNTIF too high?
Partial wildcard matches or numbers stored as text with stray characters can inflate counts.
COUNTIF across sheets?
Use a tab prefix on the range, such as COUNTIF(Orders!D2:D, "Shipped").

Related Tutorials

Watch how COUNTIF works

Browse more tutorials
3 Ways to Count in Google Sheets

3 Ways to Count in Google Sheets

The video explains three ways to count cells or information in Google Sh...
How to Iterate Counting Blank Cells in Google Sheets

How to Iterate Counting Blank Cells in Google Sheets

Count different types of blank cells. Cells with nothing in them.
Add a Word Count to Google Sheets

Add a Word Count to Google Sheets

Count your words inside a sheet. Great for ad writing, novel writing, or...
3 More Ways to Count in Google Sheets

3 More Ways to Count in Google Sheets

Learn how to use CountBlank() and more counting formulas.
Hardest Formula: SumIF | Addition Based on Dates / Values

Hardest Formula: SumIF | Addition Based on Dates / Values

Demystifying the SumIF Formula. Add up your values based on a condition,...
Spreadsheet Automation 101 Lesson 2: If ( ){ } and Checkboxes

Spreadsheet Automation 101 Lesson 2: If ( ){ } and Checkboxes

Let’s talk about the IF formula and the differences. Learn how to insert...

Related blog posts

Guides that explain COUNTIF in more depth.

Browse the blog

Related glossary terms

Done reading about COUNTIF?

Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.

Need this once

Jump to a free tool or a single tutorial for this topic.

Learning Sheets for real

Unlock the full library, generators, and templates with membership.