ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Comparisons
  3. SUMIF vs COUNTIF: Totals vs Counts

SUMIF vs COUNTIF: Totals vs Counts

By ExcelReady Team·Updated November 1, 2026·7 min read

The short answer

SUMIF adds up numbers that meet a condition; COUNTIF counts how many cells meet it. Use SUMIF for "how much" questions, like total travel spending, and COUNTIF for "how many" questions, like the number of travel claims. Both take the same criteria; SUMIF adds a third argument for the numbers to add. Divide one by the other for an average.

Key takeaways

  • COUNTIF answers how many: =COUNTIF(range, criteria). SUMIF answers how much: =SUMIF(range, criteria, sum_range).
  • Both use the same criteria rules: text and operators in quotes, like "Travel" or ">300".
  • COUNTIF counts rows, not quantities. To total units or money, use SUMIF.
  • SUMIF divided by COUNTIF gives a conditional average, the same result as AVERAGEIF.
On this page+
  1. SUMIF vs COUNTIF at a glance
  2. How the syntax differs
  3. The same data, solved both ways
  4. When to use SUMIF
  5. When to use COUNTIF
  6. Common mistakes with SUMIF and COUNTIF
  7. Our recommendation
  8. Practise it

The short answer to SUMIF vs COUNTIF: SUMIF adds the numbers that meet a condition, and COUNTIF counts the cells that meet it. One gives you a total, the other a number of rows. They use exactly the same criteria, so once you know one, the other is easy. This guide shows both on the same expense data, so you can pick the right one quickly at work or in a job test.

SUMIF vs COUNTIF at a glance#

The key question is whether you need "how much" or "how many".

FeatureSUMIFCOUNTIF
Question it answersHow much?How many?
Syntax=SUMIF(range, criteria, [sum_range])=COUNTIF(range, criteria)
Number of arguments2 or 3Exactly 2
What it returnsA total of the matching numbersA count of matching cells
Works on text columnsChecks text, adds numbers from another columnYes, counts text, numbers or dates
Result when nothing matches00
Criteria rulesText and operators in quotes, wildcards, cell referencesSame
More than one conditionUse SUMIFSUse COUNTIFS
Excel versionsAll versionsAll versions

How the syntax differs#

The two functions share their first two arguments. SUMIF adds a third.

Excel formula
=COUNTIF(range, criteria)
=SUMIF(range, criteria, [sum_range])
  • range is the cells to check, such as the Category column.
  • criteria is what they must match: "Travel", 300, ">300" or a cell like G1.
  • sum_range (SUMIF only) is the column of numbers to add for the matching rows.

COUNTIF never needs a third range, because it only counts cells in the range it checks. In SUMIF, sum_range is optional. If you leave it out, SUMIF adds the cells it checked, which only makes sense when they are numbers: =SUMIF(D2:D9,">300") adds every claim over 300. The SUMIF function guide and the COUNTIF function guide cover each argument.

The same data, solved both ways#

Here is a list of expense claims:

ABCD
1EmployeeDepartmentCategoryAmount
2LenaSalesTravel420
3OmarITSoftware150
4PriyaSalesMeals85
5JonHRTravel310
6LenaSalesTravel260
7OmarITTravel540
8KimHRMeals60
9PriyaSalesSoftware95

Question 1: travel claims#

How many travel claims are there, and how much do they add up to?

Excel formula
=COUNTIF(C2:C9,"Travel")
=SUMIF(C2:C9,"Travel",D2:D9)

COUNTIF returns 4 (rows 2, 5, 6 and 7). SUMIF returns 1,530 (420 + 310 + 260 + 540). Same range, same criteria; SUMIF just adds the Amount column for those rows.

Question 2: claims over 300#

Conditions on numbers work the same way in both. Put the operator and number together in quotes:

Excel formula
=COUNTIF(D2:D9,">300")
=SUMIF(D2:D9,">300")

COUNTIF returns 3 and SUMIF returns 1,270 (420 + 310 + 540). Here SUMIF needs no third argument, because the cells it checks are the cells it adds.

Question 3: one person's claims#

Point the criteria at a cell to reuse the formula. With Lena in G5:

Excel formula
=COUNTIF(A2:A9,G5)
=SUMIF(A2:A9,G5,D2:D9)

Lena made 2 claims worth 680 in total. Change G5 to Omar and both update: 2 claims worth 690.

Question 4: the average travel claim#

Divide the total by the count:

Excel formula
=SUMIF(C2:C9,"Travel",D2:D9)/COUNTIF(C2:C9,"Travel")

The result is 382.5 (1,530 ÷ 4). AVERAGEIF does the same in one step: =AVERAGEIF(C2:C9,"Travel",D2:D9). If nothing matches, both give #DIV/0!, because the count is 0.

Question 5: partial matches with wildcards#

Both functions accept wildcards in text criteria. A wildcard is a symbol that stands for other characters: * means any number of characters and ? means exactly one. To find every category that starts with "S":

Excel formula
=COUNTIF(C2:C9,"S*")
=SUMIF(C2:C9,"S*",D2:D9)

COUNTIF returns 2 and SUMIF returns 245 (150 + 95), both from the two Software claims. If the list later gains a "Subscriptions" category, both formulas pick it up without any change. The guide to wildcards in COUNTIF and SUMIF has more patterns.

When to use SUMIF#

Use SUMIF when the answer is an amount: money, hours, units or any other quantity. It fits questions like:

  • Total spending by category or department. "How much did Sales claim?" =SUMIF(B2:B9,"Sales",D2:D9) returns 860.
  • Totals above or below a limit. Every claim over 300, every order under 50.
  • Units sold, not orders placed. If one order is for 12 boxes, SUMIF on the Units column gives 12; COUNTIF gives 1.
  • Building a summary table, such as spending per category, with one SUMIF filled down a list of categories.

You can practise SUMIF in a live spreadsheet with a sales list.

When to use COUNTIF#

Use COUNTIF when the answer is a number of rows: how many items, people, orders or tickets. It fits questions like:

  • How many claims, tickets or orders have a certain status or category.
  • How many values pass a test, like scores of 70 or more.
  • How many cells are filled in, with "<>" as the criteria. The guide to COUNTIF for non-blank cells covers this.
  • Spotting duplicates, with =COUNTIF($A$2:$A$9,A2)>1.

COUNTIF works on any column, including text, so it's often the first function people learn for summaries. Practise COUNTIF to get quick with its criteria, and see how to use COUNTIF for more examples.

Common mistakes with SUMIF and COUNTIF#

These are the slips that most often give the wrong answer:

  1. Using COUNTIF when you need a total. "How much travel?" with COUNTIF returns 4, not 1,530. Read the question: "how much" means SUMIF.
  2. Giving COUNTIF a third argument. =COUNTIF(C2:C9,"Travel",D2:D9) shows a "too many arguments" message. Switch to SUMIF.
  3. Forgetting SUMIF's sum range on a text column. =SUMIF(C2:C9,"Travel") checks and adds the Category column, which holds text, so the result is 0.
  4. Leaving operators outside the quotes. Write ">300", not >300.
  5. Putting a cell reference inside the quotes. Write ">"&G2, not ">G2". Inside quotes, G2 is just text.
  6. Numbers stored as text. SUMIF skips text amounts, so totals come out low. Text numbers usually sit on the left of the cell.
  7. Expecting case to matter. Neither function tells "travel" from "Travel". If capitals matter, you need a different approach, such as SUMPRODUCT with EXACT.

For more than one condition, such as Travel claims in Sales, neither function is enough. Use COUNTIFS and SUMIFS. The comparisons of COUNTIF vs COUNTIFS and SUMIF vs SUMIFS show how. If you were planning to use a lookup to pull a total, read VLOOKUP vs SUMIF first.

Our recommendation#

Choose by the question, not by habit. If the answer is a number of things, use COUNTIF. If the answer is an amount, use SUMIF. Learn them together, because the criteria rules are identical: quotes around text and operators, & to join a cell, * and ? as wildcards.

A good habit in a test is to say the question out loud with the unit. "How many claims?" has the unit claims, which you count. "How much in travel?" has the unit money, which you add. If the answer should have a currency sign or a unit like hours, it's a SUMIF. If it's a plain count of rows, it's a COUNTIF. When you report both, put the count next to the total, such as "4 claims, 1,530", so readers see the size of each group as well as its value.

In short: COUNTIF for how many, SUMIF for how much, and both together for an average.

Practise it#

Try the exercise on this page: it asks how much was spent, so COUNTIF won't do. Then practise SUMIF in a live spreadsheet and practise COUNTIF, so you can answer both kinds of question without stopping to think.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Finance wants to know how much was spent on travel, not how many claims there were. In G2, use SUMIF to add the Amount (D2:D9) for rows where the Category (C2:C9) is Travel.

fx
ABCDEFGH
1
Employee
Department
Category
Amount
2
Lena
Sales
Travel
420
Travel spending
3
Omar
IT
Software
150
4
Priya
Sales
Meals
85
5
Jon
HR
Travel
310
6
Lena
Sales
Travel
260
7
Omar
IT
Travel
540
8
Kim
HR
Meals
60
9
Priya
Sales
Software
95
10
11
12

Tip: SUMIF needs three parts: the column to check (C2:C9), what to match ("Travel") and the column to add (D2:D9).

Practise this in a lesson

LessonSUMIFAdd up only the numbers that meet a condition, with and without a separate sum range.LessonCOUNTIFCount the cells that match a condition, from exact words to number checks like ">=8".Function guideSUMIFAdd up values that meet one condition with SUMIF. Totals by category, person or amount, the argument-order trap, and a live exercise.Function guideCOUNTIFCount cells that match one condition with COUNTIF: text, numbers, wildcards and cell references. Real examples and a live exercise.

Frequently asked questions

What is the difference between SUMIF and COUNTIF?

+

COUNTIF counts the cells that meet a condition, so it returns a number of rows. SUMIF adds the values in another column for the rows that meet the condition, so it returns a total such as an amount of money.

Can COUNTIF add numbers?

+

No. COUNTIF only counts how many cells match. If you need to add amounts, hours or units, use SUMIF with the column of numbers as its third argument.

How do I get an average with SUMIF and COUNTIF?

+

Divide the SUMIF by the COUNTIF with the same condition: =SUMIF(C2:C9,"Travel",D2:D9)/COUNTIF(C2:C9,"Travel"). AVERAGEIF gives the same result in one function.

Do SUMIF and COUNTIF use the same criteria?

+

Yes. Both accept text like "Travel", numbers, comparisons like ">300", wildcards like "Tr*" and cell references. Neither is case-sensitive.

What should I use for more than one condition?

+

Use SUMIFS and COUNTIFS. They work the same way but accept several range and condition pairs, and they count or add a row only when every condition is true.

Sources

  • SUMIF function - Microsoft Support
  • COUNTIF function - Microsoft Support
  • AVERAGEIF function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. SUMIF vs COUNTIF at a glance
  2. How the syntax differs
  3. The same data, solved both ways
  4. When to use SUMIF
  5. When to use COUNTIF
  6. Common mistakes with SUMIF and COUNTIF
  7. Our recommendation
  8. Practise it

Keep reading

Comparisons· 7 min read

COUNTIF vs COUNTIFS: What's the Difference?

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.

Comparisons· 8 min read

SUMIF vs SUMIFS: What's the Difference?

SUMIF adds up numbers that meet one condition. SUMIFS adds up numbers that meet one or more conditions, and every condition must be true. The other big difference is argument order: SUMIF puts the range to add last, while SUMIFS puts it first. Both work in every current version of Excel.

Comparisons· 8 min read

VLOOKUP vs SUMIF: Which to Use for Totals

Use SUMIF for totals and VLOOKUP for looking up one value. VLOOKUP stops at the first matching row, so it gives the wrong total when a customer appears more than once. SUMIF adds every matching row. SUMIF can also look up a number by a unique ID, but it can't return text and returns 0, not #N/A, when nothing matches.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free