COUNT function
Counts how many cells contain numbers (including dates and times). Text, blanks, TRUE/FALSE and errors are not counted.
Available in All versions of Excel, Excel for the web, Excel for Mac
In every Excel versionWorks in Google Sheets
Syntax
COUNT(value1, [value2], ...)| Argument | What it means | |
|---|---|---|
value1 | Required | The first cell, range or value to count. |
value2, ... | Optional | Up to 254 more cells, ranges or values. |
Returns: A whole number: how many numeric values were found.
How COUNT works
COUNT tells you how many cells in a range hold a number. It is the right tool when you want to know how many invoices have an amount filled in, how many students have a score, or how many orders have a shipping date. Because Excel stores dates and times as numbers, they are counted too, and so are zeros.
Everything that is not a number is skipped: empty cells, text such as "pending" or "n/a", TRUE/FALSE values and error values. A very common surprise is numbers stored as text (often imported from another system and shown left-aligned with a small green triangle): they look like numbers but COUNT ignores them. If your count seems too low, that is the first thing to check.
To count every non-empty cell regardless of type use COUNTA; to count empty cells use COUNTBLANK; to count numbers that meet a condition use COUNTIF or COUNTIFS.
Examples
1How many invoices have an amount?
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Invoice | Amount | ||
| 2 | INV-201 | 1250 | 4 | |
| 3 | INV-202 | |||
| 4 | INV-203 | 980 | ||
| 5 | INV-204 | pending | ||
| 6 | INV-205 | 2310 | ||
| 7 | INV-206 | 0 |
Result: 4
Four cells hold numbers: 1,250, 980, 2,310 and 0. The empty cell for INV-202 and the text "pending" are not counted. The zero is counted because it is a real number.
2Count shipped orders by their date
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Order | Shipped on | ||
| 2 | SO-11 | 2026-03-02 | 3 | |
| 3 | SO-12 | not yet | ||
| 4 | SO-13 | 2026-03-04 | ||
| 5 | SO-14 | 2026-03-04 | ||
| 6 | SO-15 |
Result: 3
The three dates are stored by Excel as serial numbers (for example 2026-03-02 is 46083), so COUNT includes them. "not yet" is text and the last cell is empty, so the answer is 3 shipped orders.
3How many amounts are still missing?
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Invoice | Amount | ||
| 2 | INV-201 | 1250 | 2 | |
| 3 | INV-202 | |||
| 4 | INV-203 | 980 | ||
| 5 | INV-204 | pending | ||
| 6 | INV-205 | 2310 | ||
| 7 | INV-206 | 0 |
Result: 2
ROWS returns 6, the number of invoices in the list, and COUNT returns 4 numeric amounts. The difference, 2, is the number of invoices without a usable amount (the blank and the "pending" one).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
Count too low | Numbers are stored as text, so COUNT skips them. | Select the cells, click the warning icon and choose Convert to Number, or use Data > Text to Columns > Finish. |
Tips
=COUNT(B2:B7)and the Count shown on the status bar can differ: the status bar's Count is actually a COUNTA. Right-click the status bar and tick Numerical Count to see COUNT.- Numbers typed directly as arguments are counted even if they are text that looks like a number:
=COUNT("5")returns 1, but the same "5" in a cell stored as text is not counted. - Use COUNT in the divisor of your own averages so blanks are excluded:
=SUM(B2:B7)/COUNT(B2:B7)equals AVERAGE.
Questions
What is the difference between COUNT and COUNTA?
COUNT counts only numbers (including dates). COUNTA counts every cell that is not empty, including text, logical values and errors.
Does COUNT include zero?
Yes. 0 is a number, so it is counted. Only empty cells and non-numeric content are skipped.
Why does COUNT return 0 for my imported data?
The values are almost certainly text that only looks like numbers. Convert them to real numbers and COUNT will see them.
Google Sheets
COUNT also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
COUNT in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | POČET |
| Danish | TÆL |
| Dutch | AANTAL |
| Finnish | LASKE |
| French | NB |
| German | ANZAHL |
| Hungarian | DARAB |
| Italian | CONTA.NUMERI |
| Norwegian (Bokmål) | ANTALL |
| Polish | ILE.LICZB |
| Portuguese (Brazil) | CONT.NÚM |
| Portuguese (Portugal) | CONTAR |
| Russian | СЧЁТ |
| Spanish | CONTAR |
| Swedish | ANTAL |
| Turkish | BAĞ_DEĞ_SAY |