Practice free

COUNT function

COUNT counts numeric entries, including dates, and skips text and blanks. Use it to check how many figures a column really holds; numbers stored as text do not count.

Example

Read it as a sentence: count the cells in A1:A8 that hold numbers, which gives 8.

Practice this in the app

Syntax

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

Arguments in [square brackets] are optional.

value1 (required)
First value, array or range.
value2 (optional)
Further values or ranges.

Returns: How many of the arguments are numbers.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=COUNT({2,4,4,4,5,5,7,9}) 8 Array constant
=COUNT(10,"20",TRUE) 3 Direct args: number, text-number, TRUE
=COUNT(10,"abc") 1 Direct arg: non-numeric text
=COUNT(5) 1 Single number
=COUNT({1,"2",TRUE,3}) 2 Array with text and boolean
=COUNT(DATE(2024,1,1),NA(),"1/1/2024") 2 Date and error direct args
=SEQUENCE(5) 1 Site: numbering 1 to 5
=COUNT(Data!A1:A8) 8 Range of numbers

The Data sheet these formulas read

A cell that starts with = holds that formula.

Watch out for

  • Dates count because they are numbers; numbers stored as text do not.
  • Use COUNTA to include text.

Where it works

Excel
COUNT is in every version of Excel from 2007 on.
Google Sheets
Same name, same behaviour for everyday use.

Part of Statistical functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .