📊 Count Specific Word

Find and count the total occurrences of any specific word in your text. This tool performs case-insensitive word counting and provides real-time results as you type or paste your text.

Word Count Result:
0
Enter a word and text to get started
Text characters: 0 | Words found: 0
💡 How it works:
  • Enter the word you want to count in the "Word to Count" field
  • Paste or type your text in the textarea
  • The count updates automatically as you type
  • Search is case-insensitive (e.g., "The" and "the" are counted together)
  • Only complete words are counted (partial matches are ignored)

📝 Example:

Word to Count:
the
Text:
The quick brown fox jumps over the lazy dog. The dog was very lazy.
Result:
3 occurrences
Another Example - Word to Count:
hello
Text:
Hello world! hello there. HELLO everyone!
Result:
3 occurrences (case-insensitive)
📚 Use Cases:
  • Analyze keyword frequency in documents
  • Check repetition of specific terms in essays or articles
  • SEO keyword analysis for content optimization
  • Content compliance and consistency checking
  • Research and data analysis on text documents
  • Verify word usage patterns in writing

How a match is decided

Your search term is trimmed, any regular-expression characters in it are made literal, and it is then wrapped in word boundaries and run over the text with the global and case-insensitive flags:

pattern = /\bYOUR TERM\b/gi
count   = text.match(pattern).length

The sample text - "The quick brown fox jumps over the lazy dog. The dog was very lazy." - returns 3 for the, counting the two sentence-initial capitals alongside the lower-case one. It returns 2 for dog, because the full stop after the first one is not part of the word. Matches never overlap: searching "a a" in "a a a" gives 1, not 2.

Where the word boundary bites

A boundary only recognises A-Z, 0-9 and the underscore, so a term ending in an accented letter can never close one: searching for cafe with an acute accent returns 0 even when the word is plainly there. Drop the accented letter and search the stem - caf - and it is found.

Frequently asked questions

How do I count how many times a word appears in my text?

Paste the text into the big box and put the word in the field above it. The total updates on every keystroke in either box, so there is nothing to submit, though the Count Now button forces a recount if you want one.

Is the search case-sensitive?

No. The, THE and the are all counted together, and the count is the same whichever way you capitalise the search term. There is no option to make it case-sensitive.

Does it count a word inside a longer word?

No. Only complete words are counted, so "cat" is not found inside "category" or "cats". Punctuation next to a word does not stop it counting, so dog and "dog." are the same match.