Skip to content

COUNT

Counts how many cells in a range contain numbers, including dates. Text, blanks and errors are not counted.

Syntax

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

Statistical

All versions of Excel, including Excel for Microsoft 365 and Excel for the web.

Try it

Edit the formula in B10 or change the inputs. The sheet recalculates as you type.

B10
A
B
C
1
Invoice
Amount
2
INV-801
120
3
INV-802
pending
4
INV-803
80
5
INV-804
6
INV-805
45.5
7
INV-806
n/a
8
INV-807
200
9
10
Amounts entered
4

B10 =COUNT(B2:B8) returns 4

How COUNT works

COUNT tells you how many numbers there are. It is the function to reach for when you need to know how many readings, prices or dates a column holds, or how many rows an average is really based on.

What COUNT counts

In a range or cell reference, COUNT counts a cell only when it holds a number. That includes:

  • Ordinary numbers, including zero and negatives.
  • Dates and times, because Excel stores them as numbers.
  • Percentages and currency values, which are numbers with a display format.
  • The results of formulas that return numbers.

COUNT does not count:

  • Text, including text that looks like a number, such as a code stored as "1042".
  • Blank cells and cells with empty text ("").
  • TRUE and FALSE in a range.
  • Error values such as #N/A.

Numbers typed straight into the formula are treated more generously: =COUNT(B2:B9,10,"5") counts the 10 and the text "5", because Excel can read it as a number.

COUNT, COUNTA and COUNTBLANK

These three answer different questions:

  • COUNT: how many cells hold numbers.
  • COUNTA: how many cells are not empty, whatever they hold.
  • COUNTBLANK: how many cells are empty.

Subtracting COUNT from COUNTA, as in =COUNTA(B2:B9)-COUNT(B2:B9), finds how many cells hold something that is not a number. That is a fast check for text-numbers, stray notes and error values.

Counting with conditions

COUNT has no condition of its own. To count numbers that meet a test, such as orders above 100, use COUNTIF or COUNTIFS.

Why it matters for averages

AVERAGE divides by the same count that COUNT returns. If an average looks wrong, check whether COUNT matches the number of rows you expect. If it is lower, some values are probably stored as text. Convert them with VALUE, Text to Columns, or by multiplying by 1, and the count should rise.

COUNT can also count columns or rows of results from other calculations, for example how many cells in a spilled array are numbers: =COUNT(A2#).

Arguments

value1
The first cell, range or value to check, such as B2:B9.
value2, ...optional
More cells, ranges or values, up to 255 arguments in all.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Count the numbers in a column

B10 =COUNT(B2:B8)

Result: 4

Four cells hold numbers: 120, 80, 45.5 and 200. The two text entries and the blank are not counted.

B10
A
B
C
1
Invoice
Amount
2
INV-801
120
3
INV-802
pending
4
INV-803
80
5
INV-804
6
INV-805
45.5
7
INV-806
n/a
8
INV-807
200
9
10
Amounts entered
4

B10 =COUNT(B2:B8) returns 4

Example 2

Dates are numbers too

B7 =COUNT(B2:B5)

Result: 3

Three shipments have a real date. The "TBC" text is not counted.

B7
A
B
C
1
Shipment
Delivered
2
S-01
01-Jan-2025
3
S-02
01-Feb-2025
4
S-03
TBC
5
S-04
01-Mar-2025
6
7
Delivered so far
3
8

B7 =COUNT(B2:B5) returns 3

Example 3

Find how many cells are not numbers

B10 =COUNTA(B2:B8)-COUNT(B2:B8)

Result: 2

COUNTA finds 6 non-empty cells and COUNT finds 4 numbers, so 2 cells hold text. The blank in row 5 is in neither count.

B10
A
B
C
1
Invoice
Amount
2
INV-801
120
3
INV-802
pending
4
INV-803
80
5
INV-804
6
INV-805
45.5
7
INV-806
n/a
8
INV-807
200
9
10
Entries that are not numbers
2

B10 =COUNTA(B2:B8)-COUNT(B2:B8) returns 2

Example 4

Count several ranges at once

B7 =COUNT(B2:B5,C2:C5)

Result: 6

North has three readings and South has three. COUNT adds the numbers found in both ranges.

B7
A
B
C
D
1
Month
North
South
2
Jan
14
9
3
Feb
18
4
Mar
11
5
Apr
20
15
6
7
Readings logged
6

B7 =COUNT(B2:B5,C2:C5) returns 6

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B11, count the weeks that have a number in the Calls logged column. A zero is a real result and should be counted.

Answer in B11.

B11
A
B
C
D
E
1
Week
Calls logged
2
Week 1
14
3
Week 2
leave
4
Week 3
22
5
Week 4
0
6
Week 5
sick
7
Week 6
18
8
Week 7
9
Week 8
25
10
11
Weeks with a number
12
Weeks with a note
13

Common mistakes

  • Numbers stored as text are not counted. If COUNT is lower than you expect, look for a green triangle in the corner of the cell, or compare it with COUNTA.
  • COUNT does not count blanks, text or errors, so it can't be used to count rows. Use COUNTA, ROWS, or COUNTA on a column that is always filled.
  • Zero is a number and is counted. If a missing value was typed as 0, COUNT will include it.
  • COUNT never returns an error for bad data in the range. A cell with #N/A is skipped without warning, so check errors separately with ISERROR.

Questions people ask

What is the difference between COUNT and COUNTA?

COUNT counts cells that hold numbers. COUNTA counts every cell that is not empty, including text, errors and empty text from formulas.

Does COUNT include dates?

Yes. Excel stores dates as numbers, so a real date is counted. A date typed as text, such as `'2025-03-01`, is not.

Why does COUNT return 0 when the range has values?

The values are probably text. Numbers imported from other systems often arrive as text. Convert them with VALUE or Text to Columns and the count will update.

How do I count numbers that meet a condition?

Use COUNTIF for one condition, such as `=COUNTIF(B2:B9,">100")`, or COUNTIFS for several.

Can COUNT count across several sheets or ranges?

It can take many ranges in one formula, such as `=COUNT(B2:B9,D2:D9)`. A range that spans sheets (a 3-D reference) also works in Excel, but this site's practice sheet has one sheet only.

Learn COUNT in a real sheet.

COUNT is taught in Excel foundations, lesson 7: COUNT and COUNTA. Each lesson is a short, graded exercise like the one above.