COUNT vs COUNTIF in Excel: Key Differences

Formulas & functions · Updated November 23, 2026

The short answer: COUNT counts how many cells in a range contain numbers, while COUNTIF counts how many cells meet a single condition you specify. Use COUNT when you just need a tally of numeric entries; use COUNTIF when you need to count cells that match a criterion, such as “over 100” or “equals ‘Paid’.”

What COUNT Does (and Doesn’t Count)

In Microsoft Excel for Microsoft 365 on Windows, the COUNT function has one job: it counts cells that contain numbers. Its syntax is:

=COUNT(value1, [value2], ...)

You can pass up to 255 arguments, each being a cell reference, a range, or a typed number. The function counts only cells that hold numeric values—this includes dates and times, because Excel stores them as serial numbers. It ignores blank cells, text, logical values (TRUE/FALSE), and errors.

For example, with the list 10, "apple", 25, TRUE, 30 in cells A1:A5, =COUNT(A1:A5) returns 3 (the numbers 10, 25, and 30).

Important nuance: If you type a number as text (e.g., with an apostrophe before it), COUNT will not count it. Also, if a cell contains a formula that returns a number, that cell is counted.

What COUNTIF Does: Counting with a Condition

COUNTIF counts cells that satisfy one condition. Its syntax is:

=COUNTIF(range, criteria)

The range is the group of cells to evaluate, and criteria is the condition, usually a number, text, or expression. The criteria can be:

  • A number: =COUNTIF(B2:B20, 100) counts cells equal to 100.
  • An expression: =COUNTIF(B2:B20, ">100") counts cells greater than 100.
  • Text: =COUNTIF(C2:C20, "Paid") counts cells that exactly equal “Paid” (not case-sensitive).
  • A wildcard: =COUNTIF(A2:A20, "A*") counts cells starting with “A”.

For example, if column B has sales amounts in B2:B20 and you want to know how many are above $500, use =COUNTIF(B2:B20, ">500"). If the range contains 7 values above 500, the formula returns 7.

Note: COUNTIF ignores blank cells and does not count cells with errors unless the criteria explicitly matches an error (which is rare).

When to Use COUNT vs COUNTIF: A Decision Guide

Choosing between them is straightforward:

  • Use COUNT when you need a simple tally of numeric cells—like how many test scores were entered, or how many transactions have amounts.
  • Use COUNTIF when you need a tally based on a condition—like how many sales exceeded a target, how many orders are from a specific region, or how many cells contain a certain word.

If you need to count text cells (not numbers), use COUNTA (counts non-empty cells) or COUNTIF with a wildcard like "*" to count all text entries. For multiple conditions, use COUNTIFS.

Common Mistakes and How to Avoid Them

Even experienced users trip on these:

  • Using COUNT on text data: COUNT returns 0 for text-only ranges. Use COUNTA instead.
  • Criteria syntax errors: In COUNTIF, operators must be in quotes. =COUNTIF(A1:A10, >5) is invalid; use ">5".
  • Case sensitivity: COUNTIF is not case-sensitive. “paid” and “Paid” are treated the same. For case-sensitive counting, use SUMPRODUCT with EXACT.
  • Wildcards in numeric criteria: Wildcards only work with text. You can’t use "1*" to count numbers starting with 1.
  • Counting errors: COUNTIF ignores errors unless you specifically count them (e.g., =COUNTIF(A1:A10, "#N/A") works).

Real-World Examples: Putting Them to Work

Here are two practical scenarios to see the difference.

Example 1: Inventory List
Suppose column A lists product IDs (text) and column B lists quantities in stock. To know how many products have any quantity entered, use =COUNT(B2:B100). To know how many products are out of stock (quantity = 0), use =COUNTIF(B2:B100, 0).

Example 2: Survey Responses
Column C contains answers like “Yes”, “No”, or blank. To count how many people responded (non-blank), use =COUNTA(C2:C200). To count how many said “Yes”, use =COUNTIF(C2:C200, "Yes").

Related Functions: COUNTIFS, COUNTA, and More

Once you master COUNT and COUNTIF, you’ll likely need these siblings:

  • COUNTIFS: Counts cells meeting multiple conditions across multiple ranges. Syntax: =COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...). For example, =COUNTIFS(A2:A20, "West", B2:B20, ">100") counts rows where region is “West” and sales exceed 100.
  • COUNTA: Counts all non-empty cells (numbers, text, errors). Useful for text data.
  • COUNTBLANK: Counts empty cells in a range.
  • SUMIF/SUMIFS: Sum values based on criteria, not count them.

Note: COUNTIFS is available in all modern Excel versions, but if you’re using Excel 2007 or earlier, it exists too. For dynamic array functions like FILTER, you need Excel 2021 or Microsoft 365.

Frequently Asked Questions

Can COUNTIF count cells with text that contains a specific word?

Yes, use wildcards. =COUNTIF(A1:A10, "*apple*") counts cells that contain the word “apple” anywhere. The asterisk represents any number of characters. For a single character, use a question mark (e.g., “A?” matches “AB” but not “ABC”).

Why does COUNT return 0 when my cells have numbers?

This usually happens when the numbers are stored as text. Check if cells have a green triangle warning or if they’re left-aligned by default. Select the column and use the “Convert to Number” warning, or use the VALUE function in a helper column.

How do I count cells that are not blank?

Use =COUNTA(range) to count all non-empty cells. If you want to count only numbers, use =COUNT(range). If you want to count cells that are not blank and not containing a specific value, combine COUNTIF with a wildcard or use SUMPRODUCT.

Is COUNTIF case-sensitive?

No, COUNTIF treats “PAID” and “paid” as the same. To do a case-sensitive count, use =SUMPRODUCT(--EXACT("Paid", A1:A10)). This works in all Excel versions.

Can I use COUNTIF across multiple sheets?

Yes, you can reference ranges on different sheets, but each range must be a contiguous block. For example, =COUNTIF(Sheet1!A1:A10, ">5")+COUNTIF(Sheet2!A1:A10, ">5"). Alternatively, use a 3D reference like =COUNTIF(Sheet1:Sheet3!A1:A10, ">5") if the sheets are adjacent and the ranges are identical.

What’s the difference between COUNTIF and COUNTIFS?

COUNTIF takes one range and one criterion. COUNTIFS takes multiple range/criterion pairs and counts only rows where all conditions are true. For example, COUNTIFS can count orders that are both “West” region and “>100” amount, which COUNTIF alone cannot do.

Performance and Limitations

Both COUNT and COUNTIF are fast, but COUNTIF can slow down on very large datasets (hundreds of thousands of rows) because it evaluates each cell. For massive data, consider using a PivotTable or the newer dynamic array functions like FILTER, which may be more efficient. Also, COUNTIF does not support array operations natively; if you need to count based on a condition that involves another column, you might need SUMPRODUCT or COUNTIFS.

One more tip: When using COUNTIF with a cell reference for the criteria, you can concatenate operators. For example, if cell D1 contains the number 100, use =COUNTIF(B2:B20, ">"&D1) to count values greater than 100. This works because the ampersand joins the text “>” with the value in D1.

Always double-check your range references—a common error is including the header row, which can skew results if the header is text (COUNT ignores it, but COUNTIF might count it if the criteria match).

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.