How to Count in Google Sheets (COUNT, COUNTA, COUNTIF and More)

To count cells in Google Sheets, click an empty cell, type a counting function such as =COUNTA(A2:A100), and press Enter. Which function you pick depends on what you want to count: COUNT counts numbers, COUNTA counts any non-empty cell, COUNTIF counts cells that meet one condition, COUNTIFS handles several conditions, COUNTBLANK counts empty cells, and COUNTUNIQUE counts distinct values.

For a quick count without a formula, highlight the cells and click the Sum box in the bottom-right corner of the sheet, then choose Count.

Quick Answer

  1. Click the cell where you want the result.
  2. Type = followed by the function, for example =COUNTIF(B2:B20,”Paid”).
  3. Press Enter to see the count.
  4. No formula needed? Highlight the cells, click Sum in the bottom right and choose Count.

In This Guide

Before You Start

You need a Google Account and a spreadsheet in Google Sheets. The steps here use Google Sheets in a web browser on a computer, as of September 2026. The functions work the same way in the Sheets mobile apps, but typing formulas is easier on a computer.

A few terms used in this guide:

  • Range: a block of cells, written as the first and last cell separated by a colon. A2:A20 means cells A2 through A20.
  • Criterion: the condition a cell must meet to be counted, such as “Paid” or “>20”.
  • Function: a built-in formula. Every formula starts with an equal sign (=).

The examples below use this small sample sheet of orders. Row 1 holds headers, and data runs from row 2 to row 7:

Row A: Customer B: Region C: Amount D: Status
2 Ana North 450 Paid
3 Ben South 120 Unpaid
4 Ana North (blank) Paid
5 Chris East 600 (blank)
6 Dee North N/A Paid
7 Ben South 300 Unpaid

How to Enter a Count Formula

  1. Open your spreadsheet in Google Sheets.
  2. Click an empty cell where you want the result to appear, such as a cell below or beside your data.
  3. Type an equal sign (=) and then the function name, such as COUNTA. Expected result: Sheets shows a help box with the function’s definition, syntax and an example. It may also suggest a formula or range based on your data.
  4. Type an opening parenthesis, then select the range with your mouse or type it, for example D2:D7.
  5. Add any other arguments (such as a criterion), type a closing parenthesis, and press Enter. Expected result: The cell shows the count. Click the cell to see the formula in the formula bar.

Tip: Put a criterion in its own cell (for example, type North in F1) and refer to that cell in the formula. Then you can change what’s counted without editing the formula. Google’s Add formulas and functions guide covers the basics of entering formulas.

COUNT: Count Numbers

COUNT returns how many numeric values are in a range. Text is ignored, and so are empty cells.

Syntax: COUNT(value1, [value2, …])

Example: =COUNT(C2:C7) returns 4. The four amounts (450, 120, 600, 300) are counted; the blank cell and “N/A” are not.

  • You can count several ranges at once: =COUNT(C2:C7,E2:E7).
  • Repeated numbers are each counted. Two cells containing 100 add 2 to the count.
  • Numbers stored as text (for example, entered with a leading apostrophe) are treated as text, so COUNT skips them.
  • Dates are generally stored as numbers in Sheets, so a date column usually counts too.

See Google’s COUNT help page for the official notes.

COUNTA: Count Non-Empty Cells

COUNTA counts every cell that holds something: numbers, text or dates.

Syntax: COUNTA(value1, [value2, …])

Example: =COUNTA(D2:D7) returns 5, because one Status cell is empty.

Use COUNTA to count entries in a list, such as responses, names or rows of data. One catch: Google notes that COUNTA also counts zero-length strings and whitespace. A cell that looks empty but contains a space, or a formula that returns “” (an empty string), still counts. If your total seems too high, that’s the likely reason.

COUNTIF: Count With One Condition

COUNTIF counts cells in a range that meet a single condition.

Syntax: COUNTIF(range, criterion)

Examples using the sample sheet:

  • =COUNTIF(D2:D7,”Paid”) returns 3: rows with the status Paid.
  • =COUNTIF(C2:C7,”>200″) returns 3: amounts over 200.
  • =COUNTIF(B2:B7,”<>North”) returns 3: rows where the region is not North.
  • =COUNTIF(A2:A7,”B*”) returns 2: names starting with B.
  • =COUNTIF(B2:B7,F1) counts rows matching whatever region you type in F1.

Rules for writing the criterion:

  • Text goes in quotation marks. COUNTIF isn’t case-sensitive, so “paid” also matches “Paid”.
  • Comparisons use =, >, >=, <, <= and <> (not equal), inside quotation marks with the number, such as “>=100”.
  • Wildcards: a question mark (?) matches any single character, and an asterisk (*) matches zero or more characters. To search for an actual ? or *, put a tilde (~) in front of it.
  • Combine with a cell using an ampersand: “>”&G1 counts values greater than the number in G1.

COUNTIF accepts only one condition. For more, use COUNTIFS. Google’s COUNTIF help page lists the full criterion rules.

If you want to count how often a particular word appears across a sheet, our guide to counting how many times a word appears in Google Sheets walks through that use of COUNTIF in more detail.

COUNTIFS: Count With Several Conditions

COUNTIFS counts rows that meet every condition you give it. Think of it as “this AND that.”

Syntax: COUNTIFS(criteria_range1, criterion1, [criteria_range2, criterion2, …])

Examples:

  • =COUNTIFS(B2:B7,”North”,D2:D7,”Paid”) returns 3: North orders that are paid.
  • =COUNTIFS(B2:B7,”South”,C2:C7,”>200″) returns 1: South orders over 200.
  • =COUNTIFS(C2:C7,”>100″,C2:C7,”<500″) returns 3: amounts between 100 and 500. You can use the same range twice to set a range of values.

Important: every range must be the same size and shape. If one range is B2:B7, the others must also cover six rows and one column, or the formula returns an error. See the COUNTIFS help page for more examples, including date conditions such as “<“&DATE(2026,1,1).

COUNTIFS can’t do “this OR that” in one criterion. For OR logic, add two COUNTIF results together, for example =COUNTIF(B2:B7,”North”)+COUNTIF(B2:B7,”East”).

COUNTBLANK: Count Empty Cells

COUNTBLANK counts the empty cells in a range, which is handy for finding missing data.

Syntax: COUNTBLANK(value1, [value2, …])

Example: =COUNTBLANK(C2:D7) returns 2: one missing amount and one missing status.

Note the difference from COUNTA: Google says COUNTBLANK treats cells with no content and cells containing an empty string (“”) as blank. So a formula that returns “” is counted as blank by COUNTBLANK but as filled by COUNTA.

COUNTUNIQUE: Count Distinct Values

COUNTUNIQUE counts how many different values appear, counting each value once no matter how often it repeats.

Syntax: COUNTUNIQUE(value1, [value2, …])

Example: =COUNTUNIQUE(A2:A7) returns 4: Ana, Ben, Chris and Dee. Ana and Ben each appear twice but count once.

To count unique values that meet conditions, use COUNTUNIQUEIFS. For example, =COUNTUNIQUEIFS(A2:A7,B2:B7,”North”) returns 2 (Ana and Dee). Google notes that COUNTUNIQUE doesn’t count unique rows across multiple columns; it looks at individual values.

If you’d rather see the repeated values than count them, our guide to highlighting duplicates in Google Sheets shows how to color them.

Quick Count Without a Formula

When you just need a number to glance at, Sheets can count a selection for you.

  1. Highlight the cells you want to count.
  2. Look at the bottom-right corner of the window. Expected result: You’ll see a box showing “Sum:” and a total.
  3. Click Sum to open the list of other calculations.
  4. Choose Count for all filled cells or Count numbers for numeric cells only.

The list also includes Average, Minimum and Maximum. Google notes this feature doesn’t work for some number or currency formats. The result isn’t saved in the sheet, so use a formula if you need the count to stay visible or update automatically. Details are in See the sum and average.

Which Function Should You Use?

You want to count… Use Sample formula
Cells containing numbers COUNT =COUNT(C2:C7)
Any filled cell COUNTA =COUNTA(D2:D7)
Cells matching one condition COUNTIF =COUNTIF(D2:D7,”Paid”)
Rows matching several conditions COUNTIFS =COUNTIFS(B2:B7,”North”,D2:D7,”Paid”)
Empty cells COUNTBLANK =COUNTBLANK(C2:D7)
Different values COUNTUNIQUE =COUNTUNIQUE(A2:A7)
A one-time number, no formula Sum box, then Count Highlight cells

Counting words inside cells is a different task that uses text functions rather than these. See our guide to counting words in Google Sheets.

Troubleshooting

COUNT returns 0 even though the cells have numbers

The numbers are probably stored as text, which often happens with imported or pasted data. Try COUNTA to confirm the cells aren’t empty, then convert them: select the cells and pick a number format from the Format > Number menu. If they’re still text, retyping the values or removing a leading apostrophe fixes it.

COUNTA gives a higher number than expected

Some “empty” cells contain spaces, or formulas that return “”. COUNTA counts those. Check suspicious cells by clicking them and looking at the formula bar.

COUNTIFS returns an error

Make sure every range covers the same number of rows and columns. B2:B7 paired with D2:D10 won’t work.

COUNTIF with a comparison counts nothing

Put the operator and number together inside quotation marks, like “>200”. When comparing with a cell, join them with an ampersand: “>”&G1.

Text matches are missed

Look for extra spaces before or after the text in your data. “Paid ” with a trailing space doesn’t match “Paid”. A wildcard like “Paid*” can help, or clean the data first.

The count doesn’t update when I add rows

If you add data below the range, the formula won’t include it. Use a wider range (such as C2:C1000) or a whole-column reference such as C:C, keeping in mind that a whole column also includes the header row.

Frequently Asked Questions

What’s the difference between COUNT and COUNTA?

COUNT counts only numeric values. COUNTA counts any non-empty cell, including text.

Is COUNTIF case-sensitive in Google Sheets?

No. Google’s documentation states COUNTIF is case-insensitive, so “north” and “North” are treated the same.

How do I count cells that contain any text?

Use =COUNTIF(A2:A100,”*”). The asterisk wildcard matches any text. Wildcards are meant for text, so numeric cells typically aren’t matched, which makes this a handy way to count text entries.

How do I count rows in Google Sheets?

Use COUNTA on a column that is always filled, such as an ID or name column. For example, =COUNTA(A2:A) counts filled cells from row 2 down.

Can I count checkboxes that are ticked?

Yes. By default, a checked box holds the value TRUE, so =COUNTIF(E2:E50,TRUE) counts ticked boxes. If you set custom checkbox values, count those instead.

How many values can COUNT take?

Google says COUNT, COUNTA and COUNTUNIQUE are specified with a 30-argument maximum, but Sheets supports an arbitrary number of arguments.

Summary

  1. Type = and a function name in an empty cell, add the range, and press Enter.
  2. Use COUNT for numbers and COUNTA for any filled cell.
  3. Use COUNTIF for one condition and COUNTIFS for several, with same-size ranges.
  4. Use COUNTBLANK for empty cells and COUNTUNIQUE for distinct values.
  5. For a quick look, highlight cells and choose Count from the Sum box.

Next step: Open one of your own sheets, add a COUNTIF formula that counts a status or category you track, and point its criterion at a separate cell so you can switch what it counts.