COUNT vs COUNTIF in Excel: Which One Should You Use?

Formulas & functions · Updated November 19, 2026

COUNT counts cells containing numbers, while COUNTIF counts cells that meet a condition you specify. Use COUNT for a numeric total; use COUNTIF when the question is something like “How many orders are marked Paid?” or “How many values are above 10?”

The quick difference

Both functions return a number, but they answer different questions. COUNT looks at the contents of its arguments and includes numeric values. COUNTIF tests the cells in a range against a criterion and counts the matches. That criterion can describe a number, text, a comparison, or whether a cell is blank.

  • COUNT: How many numeric entries are in this range?
  • COUNTIF: How many entries in this range meet this one condition?

For example, a sales list might contain amounts, empty cells, and labels such as “Pending.” COUNT can report how many numeric sales amounts are entered. COUNTIF can report how many rows say “Pending,” or how many amounts exceed a chosen threshold. Neither function adds the values: use SUM or SUMIF when the goal is a total amount rather than a count of entries.

How COUNT works

COUNT accepts one or more values or ranges and counts the numeric values it finds. In worksheet references, numbers are counted; text, empty cells, and logical values such as TRUE or FALSE are not. Dates and times are counted because Excel stores them as numbers, even though the cells may display as calendar dates or clock times. Percentages and currency values are also numeric when stored as numbers.

Suppose A2:A8 contains 12, 0, a blank cell, the text N/A, 25, 8, and another blank. With those values in A2:A8, the formula =COUNT(A2:A8) returns 4: it counts 12, 0, 25, and 8. Zero counts as a number; it is not treated as blank. The text label and two empty cells do not contribute to the result.

A common misconception is that COUNT counts every cell that looks filled. It does not. A number stored as text—for instance, imported data with a leading apostrophe—may look like a number but is not counted as numeric in a cell reference. If a count seems too low, check whether the source values are genuine numbers or text. Formatting alone does not convert text into a number.

How COUNTIF works

COUNTIF takes a range to inspect and a criterion to test against each cell. It counts cells that satisfy that one criterion. The criterion can be an exact text match, a number, or a comparison such as greater than a threshold. COUNTIF is available in current Microsoft Excel for Microsoft 365 on Windows and is also present in many earlier desktop editions.

Using the same A2:A8 example, the formula =COUNTIF(A2:A8,">10") returns 2, because 12 and 25 are greater than 10. With that same range, =COUNTIF(A2:A8,"N/A") returns 1, counting the text entry. COUNTIF can therefore count matching text as well as matching numbers; it is not limited to numeric data.

For a text category, imagine B2:B20 holds order statuses. With statuses in B2:B20, =COUNTIF(B2:B20,"Paid") counts the cells whose content matches Paid. COUNTIF is not case-sensitive, so “Paid” and “paid” are treated as the same text for this purpose. Extra spaces, however, can prevent an apparent match: “Paid ” with a trailing space is not necessarily the same entry as “Paid.”

Criteria, operators, and wildcards

In a COUNTIF criterion, comparison operators are written inside quotation marks when typed directly into the formula. Common operators include greater than (>), less than (<), greater than or equal to (>=), less than or equal to (<=), not equal to (<>), and equal to (=). For example, with scores in A2:A8, the criterion “>10” counts values greater than 10; it does not include 10 itself. Use “>=10” when 10 should also qualify.

A threshold can come from a worksheet cell rather than being typed into the criterion. If A2:A20 contains scores and E1 contains the threshold, =COUNTIF(A2:A20,">"&E1) counts scores above the value in E1. The ampersand joins the comparison operator to the cell value so Excel can interpret it as a criterion. If E1 contains 10, this formula counts values greater than 10.

COUNTIF also supports wildcards for text searches:

  • * matches any sequence of characters, including no characters. A criterion such as "North*" matches text beginning with North.
  • ? matches one character. A criterion such as "A?C" matches three-character text beginning with A and ending with C.
  • ~ lets you search for a literal wildcard character. For example, a tilde before an asterisk means “match an actual asterisk,” rather than treating the asterisk as a wildcard.

Wildcards are useful for categories with consistent naming, but they can also make a count broader than intended. Before relying on a wildcard result, review the entries it might include.

Choosing the right function

Start by describing the question in plain language. If it is “How many cells contain numeric values?” choose COUNT. If it is “How many cells meet this condition?” choose COUNTIF. A table of responses, statuses, or text labels usually calls for COUNTIF, while a numeric measurement column may call for COUNT.

  • Use COUNT for the number of numeric entries in a range, including zeroes, dates, and times.
  • Use COUNTIF for one condition, such as a particular status, a minimum score, or a nonblank test.
  • Use COUNTIFS when a row must meet two or more conditions, such as a status and a date or amount threshold.
  • Use COUNTA when you want to count cells containing data of any type, rather than only numbers.
  • Use COUNTBLANK when the question is specifically how many cells are blank.

For example, with order status in B2:B20 and order value in C2:C20, use COUNTIFS if the question is “How many Paid orders are worth at least 100?” The formula =COUNTIFS(B2:B20,"Paid",C2:C20,">=100") counts rows where both conditions are met. COUNTIF alone is designed for a single condition, so it cannot express that two-part test by itself.

COUNT vs COUNTIF vs related functions

The word “count” can mean different things in a spreadsheet. COUNT does not count every nonempty cell; COUNTA is generally the relevant function for that question. COUNTA counts cells containing data, including text, numbers, and some error values. COUNTBLANK counts cells Excel treats as blank. In particular, formula results and imported data can make a sheet’s apparent blanks less straightforward than they look, so check the actual contents if a result surprises you.

COUNTIF is more flexible than COUNT for category questions, but it still applies one criterion to one range. COUNTIFS extends the idea to multiple criteria, and SUMIF or SUMIFS are for adding values that meet conditions. For instance, “How many Paid orders?” is a counting question; “What is the total value of Paid orders?” is a summing question. Picking the function that matches the question prevents a plausible-looking but incorrect result.

These functions do not require a special ribbon command. Enter a formula in a worksheet cell, or select a cell and use the formula bar. The same formula syntax applies in Excel for Microsoft 365 on Windows, Mac, and the web, although the surrounding interface can differ. COUNT and COUNTIF are established functions and do not require a newer dynamic-array version of Excel.

Common problems and how to check them

If a COUNT result is lower than expected, inspect the source data for numbers stored as text. Imported CSV files, copied web data, and values with leading spaces or apostrophes are common causes. You can select suspicious cells and look for inconsistent alignment or warning indicators, but those visual clues are not conclusive. Confirm the underlying cell values and convert text numbers to real numbers if numeric counting is intended.

If COUNTIF returns zero despite visible matches, check spelling, leading or trailing spaces, and whether the target range is correct. COUNTIF does not distinguish letter case, but it does require the contents to match its criterion. Also verify that a comparison criterion includes the intended operator and boundary: “>10” excludes 10, while “>=10” includes it.

Other useful checks include:

  • Make sure the range and criterion refer to the intended rows. A range ending at row 20 will not include new entries added below it.
  • Check that numeric criteria are being compared with numeric data, not numbers stored as text.
  • When using a criterion from another cell, ensure the operator is joined to the reference correctly, as in ">"&E1.
  • Look for hidden filters or manually hidden rows. COUNT and COUNTIF ordinarily count matching cells in the referenced range whether or not rows are hidden.
  • Use a bounded range or an Excel Table for growing datasets so the formula’s range includes new records consistently.

For a date condition, use a cell that contains a real Excel date rather than typing a date string whose interpretation might depend on regional settings. With dates in D2:D30 and a real date threshold in F1, =COUNTIF(D2:D30,">="&F1) counts dates on or after the threshold. In this layout, the result is the number of qualifying date cells; it will vary with the actual data.

Frequently Asked Questions

Does COUNT in Excel count zero?
Yes. Zero is a numeric value, so COUNT includes a cell containing 0. A genuinely empty cell is not counted.

Can COUNTIF count text?
Yes. Give it a text criterion, such as Paid, and it counts matching cells in the selected range. Text matching is case-insensitive, though extra spaces or different characters can affect a match.

What is the difference between COUNTIF and COUNTIFS?
COUNTIF applies one criterion to a range. COUNTIFS can apply multiple criteria, such as requiring both a particular status and a minimum amount on the same row.

Does COUNTIF count blank cells?
It can. A blank criterion is used to count blank cells, while a not-blank criterion can count cells with content. Be careful when formulas return an empty string, because a cell that looks blank may still contain a formula.

Why does COUNT ignore a number that I can see?
The value may be stored as text rather than as a number. This often happens with imported or pasted data. Convert it to a genuine numeric value if it should be included in a numeric count.

Which function counts all filled cells?
COUNTA is usually the choice for counting cells containing data, whether the contents are text or numbers. COUNT is narrower: it counts numeric values only.

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.