Count Word Frequency in Google Sheets
A practical guide to building and checking a word frequency counter in Google Sheets, covering formulas, tokenization limits, and how to interpret repeated-word counts.
Direct answer
Google Sheets has no single built-in “word frequency counter” function, but you can combine built-in functions to count how often each word appears in a range. A common approach is to split a text range into separate words with SPLIT, place those words in one column, remove blanks and punctuation where needed, then use COUNTIF or a QUERY grouping formula to produce the repeated-word tally. The result is only as reliable as the tokenization step: the formula has to decide what counts as a word, how case, punctuation, line breaks, numbers and multi-word phrases are handled, and whether whitespace alone is enough to separate tokens.
Build a basic counter with built-in functions
The simplest formula pattern uses SPLIT and COUNTIF. Put the text in one cell or one column, then create a helper column that repeats each word as a separate row.
=SPLIT(A2," ")
If the text is in A2, this returns each space-separated fragment across neighboring cells. The fragment is not automatically a clean word: attached punctuation, capital letters and empty elements can remain. A more consistent single-column arrangement can be produced with TRANSPOSE and QUERY, but the basic SPLIT output is sufficient for a first count.
After collecting the split output, list the unique candidates in a separate column and apply a count condition.
=COUNTIF(split_range, candidate_cell)
This counts matching values in the split range. Because COUNTIF normally treats text as case-insensitive, words such as “Report” and “report” can be counted together. If case-sensitive counting is required, a different formula or a prepared normalized column is needed.
Group counts with QUERY
When the split results are in a single column, a grouping formula can return one row per token with its frequency.
=QUERY(split_column, "select Col1, count(Col1) where Col1 is not null group by Col1 label count(Col1) ''", 0)
This treats each split value as a separate item and groups repeated values. The formula does not perform linguistic cleanup by itself. If the split column contains fragments with punctuation or inconsistent capitalization, those fragments appear as distinct rows.
Tokenization limits to check
A word frequency result can be misleading if the split rule is not explicit. These limits should be checked before interpreting the output.
- Delimiter scope: splitting only on spaces leaves commas, periods, quotes and parentheses attached to words.
- Case handling: basic COUNTIF and QUERY grouping may combine uppercase and lowercase forms, which changes the count.
- Blank cells: empty text or repeated spaces can produce empty fragments that need to be excluded.
- Numbers and mixed tokens: “2024” and “Sheet2” may be counted as words unless the formula filters them out.
- Multi-word phrases: separate words are not the same as counting phrases such as “word frequency counter.”
- Column capacity: SPLIT places results across columns, so long texts may exceed the available width unless transposed into rows.
Prepare text before counting
A stable count usually requires normalization. For English word frequency, useful preparation can include trimming spaces, removing or replacing punctuation, normalizing case, and excluding empty cells. This can be done in helper columns before applying COUNTIF or QUERY.
=TRIM(REGEXREPLACE(A2, "[[:punct:]]", " "))
REGEXREPLACE can remove or isolate punctuation, but its exact effect depends on the regular expression used. It does not by itself distinguish words from numbers or enforce a dictionary. After cleanup, the text should be split again and the resulting candidates reviewed for fragments that the formula did not remove.
Single-column workflow
A practical structure is to use one helper column for cleaned text, another for the split output, and a third area for the unique count table. The exact row and column layout depends on the source data, but the sequence should be visible in the sheet so that the count can be traced back to the original text.
| Step | Sheet action | What it establishes |
| 1 | Put source text in a readable input range | The text being measured |
| 2 | Create cleaned text with TRIM and REGEXREPLACE rules | The tokenization decision |
| 3 | Split cleaned text into one helper column | The list of counted tokens |
| 4 | Use COUNTIF or QUERY grouping | The frequency result |
| 5 | Inspect grouped rows for fragments or unwanted items | The quality check |
Interpreting the frequency result
The output is a count of matching sheet values under the chosen splitting and normalization rules. It is not automatically a natural-language word count. A high number may mean a genuine repeated word, but it may also mean the same capitalization variant, a punctuation-attached fragment, or a token such as “—”. Compare the grouped rows with the original text before treating the result as a keyword frequency.
Stemming and phrase detection are not included in the basic formula approach. Different forms such as “count,” “counts” and “counter” remain separate unless you add a lookup or normalization rule. A counter built from SPLIT and COUNTIF will not automatically group inflected forms or identify repeated expressions.
Known gaps
- No documented single built-in function in Google Sheets is named as a complete word frequency counter.
- The exact behavior of REGEXREPLACE depends on the regular expression dialect supported by Google Sheets, so the cleanup must be confirmed on the actual data.
- Formula performance across very large ranges is not stated here and should be tested with the source sheet.
- Locales and language-specific tokenization are not covered by a space-based SPLIT approach.