Count Word Frequency in Excel
Learn how to count how often each word appears in an Excel cell, column, or sheet using text functions and structured examples.
What word frequency counting does
A word frequency operation in Excel counts how many times a specific word or sequence appears within text. This is useful when you need to measure repetition in a cell, column, or selected text range without reading through every value manually.
Scope of the result
The simplest result is a number representing occurrences in one text value or cell. You can also build a frequency table by listing candidate words in one column and applying a counting formula next to each word. This lets you compare frequencies across words in a supplied data range.
Input to work with
Use text values that are already stored in worksheet cells. For reproducible results, avoid changing the original text while testing the formula. If your source text contains extra spaces, line breaks, or nonstandard characters, the counting behavior can be affected.
Example counting formula
One common approach is to calculate the occurrence count by comparing the length of the original text with the length after removing the target word. The following example shows the structure:
=(LEN(A2)-LEN(SUBSTITUTE(A2, B2, "")))/LEN(B2)
In this example, cell A2 contains the original text and cell B2 contains the word being counted. The formula removes each occurrence of the word from the text, measures the difference in character length, and divides by the length of the word. This example is illustrative and should be checked against your own data.
Important limitations
This length-based approach counts characters, not whole-word boundaries. A target such as "cat" would also match part of a longer text like "catalog" in the example calculation. Case sensitivity also depends on how the substitution is applied.
The supplied context does not specify a verified behavior for case-insensitive matches, whole-word matching, punctuation handling, or how leading and trailing spaces are treated. Treat those details as gaps if they matter for your intended result.
Using a frequency table
For a list of words, place each candidate word in its own cell. Use one counting formula per candidate and keep the original text reference fixed if you are filling the formula down a column.
- Keep the original text in one column
- Keep each candidate word in a separate row
- Apply the counting formula next to each candidate word
This structure allows you to see which words appear most often in the supplied text range. Edit candidate words deliberately, because an unintended spelling difference will produce a different count.
What to verify
Before relying on the result, verify it with a small sample where you can see every occurrence. Check that the formula counts the intended matches and does not change the original cell content. Preserve exact capitalization, whitespace, and special characters when preparing your sample text.