← All comparisons

COUNT vs COUNTA: numbers only, or everything?

They look like twins but count different things: COUNT tallies only numbers, while COUNTA tallies every cell that isn't empty — text, dates, errors, TRUE/FALSE and all. Picking the wrong one is the classic reason a 'how many rows' total comes out too low or too high.

The differences at a glance

COUNTCOUNTA
What it countsNumbers only (incl. dates & times, which are numbers)Any non-empty cell — text, numbers, errors, logicals
Text valuesIgnoredCounted
Blank cellsNot countedNot counted
Formula returning ""Not countedCOUNTED — the cell isn't truly empty (the classic trap)
Error values (#N/A etc.)Not countedCounted
CompatibilityUniversalUniversal — identical in every Excel, Sheets & LibreOffice version we test

Which should you use?

Compatibility (from executed tests)

Both execute identically across every version of all three apps we test. The one behavior that surprises people isn't a compat difference — it's that a cell containing =IF(...,"") is NOT empty, so COUNTA includes it and COUNTBLANK excludes it. To count only visually-blank cells, use COUNTBLANK; to count numbers, COUNT; to count real entries including text, COUNTA.

Example formulas

COUNT — numeric entries only=COUNT(A2:A100)
COUNTA — any non-empty cell=COUNTA(A2:A100)
Text/blank rows = COUNTA minus COUNT=COUNTA(A2:A100)-COUNT(A2:A100)

Full per-version details on each function page: COUNT · COUNTA.

See also: COUNTIF vs COUNTIFS · ISBLANK vs empty string.