COUNT

Count how many cells in a range contain numbers with Excel's COUNT function.

|
Excel All versions
|
Google Sheets Supported

Spreadsheet editor

Syntax

=COUNT(value1, [value2], ...) Returns: Number

Arguments

Argument Required Description
value1 Yes The first value or range of cells where you want to count numbers.
value2 No Additional values or ranges to include. You can pass up to 255 arguments in total.

About

COUNT tells you how many cells in a range hold numbers. You point it at one or more ranges, and it returns a tally of the numeric entries, skipping anything that is blank, text, or an error. Use it when you need a quick headcount of real data, like how many test scores were recorded or how many invoices have an amount filled in.

Dates count too, since Excel stores them as numbers behind the scenes. The catch is how COUNT treats different inputs: numbers, dates, and number-like text typed straight into the formula are counted, but text, logical values (TRUE/FALSE), and errors sitting inside a referenced range are ignored. That is what makes COUNT handy for separating filled-in numbers from notes or blanks.

If you want to count every non-empty cell instead, including text, use COUNTA. To count cells that match a rule, use COUNTIF, and to add up the numbers rather than count them, use SUM.

Examples

COUNT skips text and blanks

See how COUNT ignores the 'Pending' note and the empty cell in this invoice tracker. Only the three real amounts get counted. Type a number into one of the skipped cells and watch the total climb.

Spreadsheet editor

COUNT vs COUNTA

Watch the difference when a survey rating is left as text. COUNT only sees the numbers, while COUNTA counts every filled cell. Change the 'Skipped' cell to a number and the two totals line up.

Spreadsheet editor

Average only the days with data

Combine SUM with COUNT to average just the open days in this sales log. The blank Wednesday is left out automatically. Add a number to that cell and the average recalculates instantly.

Spreadsheet editor

Watch out for

Numbers stored as text are skipped

If a cell holds "150" formatted as text (often after an import), COUNT does not see it as a number, so your total comes up short.

Convert the entries to real numbers first, for example with VALUE or by multiplying the column by 1, then run COUNT again.

Expecting COUNT to include text or blanks

COUNT ignores text, empty cells, and error values inside a range, so it will not count names, labels, or notes.

Use COUNTA to count every non-empty cell, or COUNTBLANK to count the empty ones.

TRUE/FALSE in a range are not counted

Logical values stored in cells are skipped by COUNT, even though TRUE and FALSE typed directly into the formula would be counted.

If you need to tally logical results from a range, convert them to numbers or use SUMPRODUCT on the test instead.

Trying to count with a condition

COUNT has no way to filter, so you cannot use it to count only values above a target or matching a category.

Switch to COUNTIF for one rule, or COUNTIFS for several at once.

Tips & notes

Inside a referenced range, COUNT counts numbers and dates but ignores text, logical values, and errors. Values you type directly into the argument list behave a little differently: numbers, dates, number-like text, and logical values are all counted there. To count text or logical values from a range, use COUNTA.

Common questions

What is the difference between COUNT and COUNTA?

COUNT only counts cells that contain numbers. COUNTA counts every cell that is not empty, including text, dates, and logical values.

Does COUNT count dates?

Yes. Excel stores dates as serial numbers, so COUNT treats a cell holding a date as a number and includes it in the total.

How many arguments can COUNT take?

Up to 255. Each argument can be a single value, a cell reference, or a range, and COUNT adds the numeric counts together.

How do I count cells that meet a condition?

Use COUNTIF for a single condition, like scores above 80, or COUNTIFS when you need to apply more than one rule.