← 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 (Excel for the web, Sheets & LibreOffice executed; desktop Excel per docs)

Both execute identically across every LibreOffice version we test; Google Sheets matches in our executed run; desktop Excel behavior matches per Microsoft's documentation — we do not run desktop Excel. 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. Excel for the web is a separate application with its own calculation engine, and that one we do execute: all 7 corpus cases for these functions matched the documented values there (recalculated on OneDrive, 2026-09-01); the per-case values are on the individual function pages.

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.

How-to recipes using these functions