COUNTIF vs COUNTIFS: What's the Difference?
By ExcelReady TeamUpdated 7 min read
The short answer
COUNTIF counts cells that meet one condition, such as tickets marked Open. COUNTIFS counts rows that meet several conditions at once, such as Open tickets with High priority, and every condition must be true. COUNTIFS with one pair works exactly like COUNTIF, so many people simply use COUNTIFS for everything.
Key takeaways
- COUNTIF takes one range and one criteria; COUNTIFS takes as many range and criteria pairs as you need.
- COUNTIFS uses AND logic: a row counts only if it matches every pair.
- For a between count, use COUNTIFS with two conditions on the same column.
- For OR logic, add two COUNTIFs together.
- Every range in COUNTIFS must be the same size, or you get #VALUE!.
On this page+
The difference in COUNTIF vs COUNTIFS is the number of conditions. COUNTIF counts cells that meet one condition; COUNTIFS counts rows that meet several conditions, all at the same time. COUNTIFS with a single condition does exactly what COUNTIF does, so the real question is when you need more than one. This comparison is for beginners who have used COUNTIF and want to know when to switch.
COUNTIF vs COUNTIFS at a glance#
Both count, both use the same criteria rules, and both work in every modern version of Excel. The difference is how many conditions they accept.
| Feature | COUNTIF | COUNTIFS |
|---|---|---|
| Syntax | =COUNTIF(range, criteria) | =COUNTIFS(range1, criteria1, [range2, criteria2], ...) |
| Number of conditions | One | Up to 127 pairs |
| How conditions combine | Not applicable | AND: every pair must match |
| Between two values | Subtract two COUNTIFs | Two pairs on the same column |
| OR logic | Add two COUNTIFs | Add two COUNTIFS |
| Wildcards and operators | Yes (*, ?, ">=5", "<>Low") | Yes, the same rules |
| Ranges must be the same size | Not applicable (one range) | Yes, or #VALUE! |
| Excel versions | All versions | Excel 2007 and later |
How the syntax differs#
COUNTIF has two parts: where to look and what to match. COUNTIFS repeats that pair as many times as you need.
=COUNTIF(range, criteria)
=COUNTIFS(criteria_range1, criteria1, criteria_range2, criteria2, ...)The criteria work the same way in both:
- Text goes in quotes:
"Open". - A number needs no quotes:
2. - A comparison goes in quotes with the operator:
">=8","<>Low"(not equal to Low). - A cell needs no quotes:
G1. To compare with a cell, join it:">"&G1. - Wildcards:
*for any characters,?for one character:"M*"matches Maya.
Our guide to COUNTIF with criteria examples covers every type, and the COUNTIF function guide and COUNTIFS function guide list the arguments.
The same counts, side by side#
Here is a small support-ticket log. Both functions answer the questions below on this data.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Agent | Priority | Status | Hours |
| 2 | Maya | High | Open | 3 |
| 3 | Leo | Low | Closed | 1 |
| 4 | Maya | Low | Open | 2 |
| 5 | Sam | High | Closed | 6 |
| 6 | Leo | High | Open | 4 |
| 7 | Sam | Medium | Open | 8 |
| 8 | Maya | Medium | Closed | 5 |
Task 1: one condition (how many tickets are open?)#
=COUNTIF(C2:C8,"Open")
=COUNTIFS(C2:C8,"Open")Both return 4. With one condition they are identical.
Task 2: two conditions (how many High tickets are open?)#
COUNTIF can't do this in one step. COUNTIFS can:
=COUNTIFS(B2:B8,"High",C2:C8,"Open")The result is 2 (rows 2 and 6). Row 5 is High but Closed, so it isn't counted: every pair must match.
Task 3: a between count (tickets that took 3 to 6 hours)#
COUNTIFS puts two conditions on the same column. With COUNTIF, you count "3 or more" and subtract "more than 6":
=COUNTIFS(D2:D8,">=3",D2:D8,"<=6")
=COUNTIF(D2:D8,">=3")-COUNTIF(D2:D8,">6")Both return 4 (3, 6, 4 and 5 hours). The COUNTIFS version reads more naturally.
Task 4: OR logic (tickets that are High or Medium)#
COUNTIFS conditions are always AND, so neither function does OR in one call. Add two counts instead:
=COUNTIF(B2:B8,"High")+COUNTIF(B2:B8,"Medium")The result is 5 (3 High + 2 Medium). This works because one cell can't be both. SUMIFS with OR logic shows the same idea for totals.
Task 5: one formula for a whole summary#
Real reports count the same thing for every agent. Put the names in a column and point the criteria at a cell instead of typing the name. With Maya, Leo and Sam in F2:F4, write this in G2 and fill down:
=COUNTIFS($A$2:$A$8,F2,$C$2:$C$8,"Open")The results are 2, 1 and 1. The data ranges are locked with $ so they stay put, while F2 moves to F3 and F4. COUNTIF can do the same for a single condition, =COUNTIF($A$2:$A$8,F2), which counts all tickets per agent: 3, 2 and 2.
Task 6: partial matches with wildcards#
Both functions accept wildcards in text criteria. * stands for any number of characters:
=COUNTIF(A2:A8,"M*")The result is 3, the three Maya tickets. Excel wildcards in COUNTIF and SUMIF explains ? and how to search for a real asterisk.
When to use COUNTIF#
Use COUNTIF for quick, single-condition counts. It is the natural choice when:
- You have one question about one column, such as "how many are overdue?".
- You want the shortest formula for a summary row or a quick check.
- You're building a check for duplicates:
=COUNTIF($A$2:$A$100,A2)>1flags repeated IDs. See find and highlight duplicates. - Someone else will maintain the sheet and only knows COUNTIF.
When to use COUNTIFS#
Use COUNTIFS whenever there is more than one condition. It is the better choice when:
- Conditions are on different columns, such as agent and status, or department and rating.
- You need a between count on dates or numbers, such as all orders in March:
=COUNTIFS(A2:A50,">="&DATE(2026,3,1),A2:A50,"<"&DATE(2026,4,1)). - The criteria come from cells, so one formula can be filled across a summary grid. Our guide to COUNTIFS and SUMIFS with multiple conditions builds one.
- You might add a condition later. Starting with COUNTIFS means you only add a pair, not rewrite the formula.
Headcount by department and grade is a classic HR use; see Excel skills for HR and recruiting jobs.
Common mistakes with COUNTIF and COUNTIFS#
Most wrong counts come from a few small slips:
- Ranges of different sizes in COUNTIFS.
=COUNTIFS(A2:A8,"Maya",C2:C9,"Open")returns #VALUE!. Every range must cover the same rows. - Missing quotes around operators.
=COUNTIF(D2:D8,>=3)is a syntax error. Write">=3". - Putting a cell reference inside the quotes.
">G1"looks for text that is literally ">G1". Write">"&G1. - Expecting OR from COUNTIFS.
=COUNTIFS(B2:B8,"High",B2:B8,"Medium")returns 0, because no cell is both. - Hidden spaces in the data. "Open " with a trailing space doesn't match "Open". Clean the column with TRIM, or use
"Open*". - Counting blanks by accident.
"<>Closed"also counts empty cells. AddC2:C8,"<>"as a second pair to skip them; see count non-blank cells with a condition.
Do COUNTIF and COUNTIFS work in all versions of Excel?#
COUNTIF works in every version. COUNTIFS was added in Excel 2007, so it works in every version you're likely to meet today, including Excel 2016, 2019, 2021, 2024, Microsoft 365, Excel for Mac and Excel for the web. Version is not a reason to choose one over the other.
If you want to see the matching rows rather than count them, use FILTER; our comparison of XLOOKUP vs FILTER explains when that fits. For turning codes into labels before you count them, see CHOOSE vs SWITCH.
Our recommendation#
Learn COUNTIF first, because it teaches the criteria rules that every "IF" function shares. Then use COUNTIFS as your everyday counting function: it handles one condition just as well, and it grows when the question gets harder.
In a job test, either is accepted for a single condition. For two or more conditions, COUNTIFS is the answer graders expect, and a between count with two pairs on one column shows you understand it well.
In short: COUNTIF for one quick condition, COUNTIFS for everything else.
Practise it#
Count Maya's open tickets in the exercise on this page. Then work through the COUNTIF lesson, which covers text, numbers, operators and cell criteria, and the COUNTIFS and SUMIFS lesson for multiple conditions.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Your manager asks how many tickets Maya still has open. In G2, use COUNTIFS to count the rows where the Agent (A2:A8) is Maya and the Status (C2:C8) is Open.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Hours | |||||||
| 2 | Maya open | |||||||
| 3 | ||||||||
| 4 | ||||||||
| 5 | ||||||||
| 6 | ||||||||
| 7 | ||||||||
| 8 | ||||||||
| 9 | ||||||||
| 10 | ||||||||
| 11 |
Tip: Two pairs, each a range then its criteria: A2:A8 with "Maya", then C2:C8 with "Open". The answer is 2.
Practise this in a lesson
Frequently asked questions
What is the difference between COUNTIF and COUNTIFS?
COUNTIF counts with one condition. COUNTIFS counts with one or more conditions, and a row is counted only when all of them are true.
Can COUNTIFS use OR logic?
Not directly; its conditions are always AND. For OR, add two counts together, such as =COUNTIF(B2:B8,"High")+COUNTIF(B2:B8,"Medium"), as long as one row can't match both.
How do I count values between two numbers?
Use COUNTIFS with the same range twice: =COUNTIFS(D2:D8,">=3",D2:D8,"<=6") counts values from 3 to 6. With COUNTIF you would subtract one count from another.
Why does COUNTIFS return #VALUE!?
The ranges are different sizes, for example A2:A8 in one pair and C2:C9 in another. Make every range cover the same rows.
Is COUNTIFS case-sensitive?
No. COUNTIF and COUNTIFS treat "open" and "OPEN" as the same text. For a case-sensitive count, combine EXACT with SUMPRODUCT.