Word frequency and keyword density: what the numbers actually mean
Frequency counts tell you what a text is made of. They do not measure quality or search relevance — here is what each number means and where the SEO myth came from.
Published
Count the words in a document and you learn something real about it. Convert that count into a percentage and call it “keyword density”, and you are one step from a myth that has outlived its usefulness by more than a decade.
Both numbers come from the same arithmetic. The difference is entirely in what you believe they mean.
Tokenisation: the rule that decides every other number
Before anything can be counted, the text has to be split into words — and different tools split differently, which is why two word counters can disagree about the same document.
The questions each tool answers silently:
- Is
don'tone word or two? - Is
well-knownone word or two? - Does
2026count as a word? - Is
caféone token, and does it matchcafe? - Do
Catandcatcount together?
The word frequency tool here treats a word as a run of
letters, digits or marks in any script, keeping apostrophes and hyphens that
sit inside a word. So don't and well-known are one each, non-Latin
scripts count properly, and numbers are excluded unless you ask for them.
None of those choices is uniquely correct. What matters is that the rule is stated, so the numbers can be interpreted rather than merely trusted.
Frequency versus relative frequency
Raw frequency is the count: “the” appears 47 times.
Relative frequency is that count as a share of the total: “the” is 6.2% of the words.
Relative frequency is what allows comparison between documents of different lengths — 47 occurrences means something different in a 500-word post and a 50,000-word thesis.
The subtlety worth knowing: what counts as the total. In the tool here, the percentage is a share of the tokens remaining after your filters. Switch stop words off and the denominator grows, so every remaining word’s percentage falls, even though nothing about the text changed. That is the arithmetic working correctly, and it is why a density figure is meaningless without the settings that produced it.
Stop words
Function words — the, of, and, is, to — dominate any frequency list in English and say almost nothing about subject matter. Removing them surfaces the content words, which is usually what you actually want to see.
Two cautions. First, a stop-word list is a judgement call: an aggressive list that removes topic-adjacent words can hide something meaningful, which is why the list here is deliberately conservative — function words only. Second, stop words are not noise in every analysis. In authorship attribution and stylometry they are the signal, because how often someone writes “upon” versus “on” is a fingerprint that survives topic changes.
N-grams: what the text says, not which words it uses
Single-word counts miss phrases. A document where “machine” and “learning” both appear often may be about machine learning — or about washing machines and distance learning.
Counting two- and three-word sequences (bigrams and trigrams) resolves that. It is also where most of the practical insight lives when analysing your own writing: repeated phrases show up as habits far more clearly than repeated words.
One implementation detail with real consequences: stop words must be removed before phrases are built, not after. Otherwise “the big cat” produces the bigram “the big” rather than “big cat”, and the results fill with grammatical noise.
The keyword density myth
Here is where the numbers get misused.
In the late 1990s, search engines really did weight term frequency heavily, and repeating a keyword really did move rankings. That era produced keyword stuffing, and search engines responded — first by penalising it, then by moving to entirely different models. Modern ranking uses semantic relevance, link signals, user behaviour and much else. Term frequency is, at most, a minor input long since subject to diminishing returns.
Despite that, “optimal keyword density” persists as advice, usually quoted as some confident-sounding range like 1–3%. No such target exists. Google has never published one, and no percentage will improve a ranking. Writing to hit a number reliably produces worse prose, and worse prose performs worse on the signals that do matter.
If you find yourself checking density to decide whether to add another mention of a phrase, the honest answer is: write the sentence that reads best.
What frequency analysis is genuinely good for
Set aside the SEO framing and the tool becomes useful:
- Catching your own tics. Every writer overuses something. Seeing “actually” 31 times is more persuasive than any style guide.
- Checking what a document is about. The top content words of a draft should match its subject. When they do not, the draft has drifted.
- Comparing versions. Frequency profiles before and after an edit show what actually changed in emphasis.
- Research and content analysis. Counting terms across interview transcripts or survey responses is a standard qualitative method.
- Reading level and repetition in editing, especially for instructional writing where repeated terminology is a feature rather than a fault.
What it cannot do is measure quality. A text with a beautiful frequency distribution can be incoherent, and a repetitive text can be the clearest possible explanation. The count describes the words; it does not read them.