COUNT function
COUNT tells you how many cells contain numbers. Dates count too, because Excel stores them as numbers, while text, empty cells and errors are skipped. It's useful for checking how many entries have a value filled in, and for spotting numbers that were imported as text.
- Available in
- Every current version
- Category
- Statistical functions
- Returns
- The number of numeric values.
- Google Sheets
- Also available in Google Sheets.
Syntax
=COUNT(value1, [value2], ...)
| Argument | Required? | What it is |
|---|---|---|
value1 | Required | The first value, cell or range to count. |
value2 | Optional | More values, cells or ranges, up to 255 in total. |
Examples
Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.
| Cell | Formula | Result | What it shows |
|---|---|---|---|
| F2 | =COUNT(B2:B6) | 4 | Four amounts; the word "pending" isn't a number |
| F3 | =COUNT(C2:C6) | 3 | Dates are numbers, so this counts the paid invoices |
| F4 | =COUNT(A2:A6) | 0 | Zero, because the IDs are text. Use COUNTA for text |
Try it live
This is the sample sheet. Change any number or text, or edit a formula, and the results update.
Show the sample data as a table
| Invoice | Amount | Paid on | Check | Result | |
| INV-101 | $450 | 3/4/2026 | Amounts entered | 4 | |
| INV-102 | pending | Invoices paid | 3 | ||
| INV-103 | $1,200 | 3/11/2026 | Invoice IDs | 0 | |
| INV-104 | $780 | ||||
| INV-105 | $310 | 3/20/2026 |
Practice COUNT
From lesson 2, SUM, AVERAGE, MIN, MAX & COUNT. Graded instantly, then re-checked on changed data.
Counting cells
E6, count the days with a sales number. In E7, count how many days are listed in column A.Common mistakes
| What you see | Why, and how to fix it |
|---|---|
| COUNT returns 0 on a column of names | COUNT only counts numbers. Use COUNTA to count any non-empty cell. |
| Numbers aren't being counted | They're stored as text, often after an import. Look for left-aligned numbers or a green triangle in the corner. |
Tips
- Compare COUNT and COUNTA on the same column to find entries that should be numbers but aren't.
Questions
What is the difference between COUNT and COUNTA?
COUNT counts only numbers (including dates). COUNTA counts every non-empty cell, including text.
Does COUNT count dates?
Yes. Dates are stored as numbers, so COUNT includes them.
Lessons that use COUNT
Last reviewed October 2026. Every example result on this page is calculated live by the Spreadsheet Practice formula engine.