ToolsWhisper

Keyword Density Is Not a Ranking Factor. Here Is What It Is Good For

There is no ideal keyword density. How the number is calculated, why tools disagree, and the one job it does well: catching accidental overuse.

Frank4 min read

Few SEO ideas have lasted as long, or done as much harm, as keyword density: the belief that a page needs its target phrase to make up some precise percentage of its text, typically somewhere between one and three percent. The number appears in countless guides and plugin checklists. It has no basis in how search engines are described to work.

That does not make it useless. It is just useful for something different from what the checklists say.

How it is calculated

Keyword density is the number of times a term appears, divided by the total number of words, as a percentage.

An 800-word article that uses "cron expression" 12 times has a density of 12 ÷ 800 = 1.5%.

Even that simple sum hides a choice, which is why two tools often give different answers for the same page. A two-word phrase can be counted as one occurrence (12 out of 800) or as two words used (24 out of 800, which is 3.0%). Tools also differ over whether to count words in menus and footers, whether to ignore common words like "the" and "of", and whether "tool" and "tools" count as one term. The keyword density checker counts single words and phrases of two and three words, and by default ignores common words, so its numbers are best read as a comparison inside one page rather than a score to match against another tool.

Counting it yourself

For a one-off check you do not need a tool. Save the body text of the page to a file and count in a terminal:

grep -o -i "cron expression" article.txt | wc -l   # occurrences of the phrase
wc -w article.txt                                   # total words

Divide the first number by the second and multiply by 100. The grep count also matches "cron expressions" and any use inside a longer phrase, and menus or footers pasted into the file will inflate the total, so use only the article text if you want a fair figure.

What search engines say

Google has never published a target density, and its guidance points the other way. Its documentation on creating helpful, reliable, people-first content asks whether the content reads naturally and serves the reader, not whether it hits a percentage. Google's spam policies define keyword stuffing as filling a page with keywords or numbers in an attempt to manipulate rankings, including repeating the same words or phrases so often that it sounds unnatural.

The reasoning is practical. Search engines have understood synonyms, related terms and topics for a long time. A page about cron schedules that also says "crontab", "scheduler", "job" and "every five minutes" is not penalised for repeating its main phrase less often, and a page that repeats it constantly reads badly to people, which is the real cost.

There is no safe number to aim for, and so no number to hit. Anyone selling a precise percentage is selling a ritual.

What it is genuinely useful for

A density check works well as a smoke detector for accidental overuse.

When you write about a subject for long enough, you start repeating its name without noticing. A quick count shows when a term has crept up to a quarter of the page's meaningful words, or when the same two-word phrase appears in half your headings. Those are signs of writing that has gone stale, and it is worth smoothing out for readers, not for a crawler.

It is also useful for the opposite check: confirming that the topic of the page actually appears. If a post about robots.txt never uses the phrase "robots.txt" in its title, headings or first paragraph, a count will show it. Phrase counts are better for this than single words, because the single most frequent word on a page is usually something generic.

A few ways to use the numbers sensibly:

  • Look at the top few terms, not at one. They should resemble your topic. If the most repeated word is unrelated, the page may be unfocused.
  • Compare drafts against each other, not against an external target.
  • Read it aloud. If a repeated phrase sounds awkward, it is too frequent whatever the percentage says.
  • Check headings and the opening lines for the topic itself. Those places carry the most signal about what a page is about, and they are where natural wording matters most.

What to do instead of chasing a percentage

The effort that keyword density tempts people to spend is better placed elsewhere:

  1. Match the search intent. Work out what the person searching actually wants, and answer it completely.
  2. Cover the topic properly. Include the related questions, terms and examples a knowledgeable writer would include without being told.
  3. Write a clear title and description. They are the part of the page a searcher sees first. The meta tag generator previews both, and why Google rewrites your meta description covers when your wording is replaced.
  4. Keep the writing readable. The readability checker scores sentence length and complexity, and the word counter shows length and reading time at a glance.

Use density as a quick sanity check, not as a target. If you feel you need a formula to know whether a page is optimised, re-read it as a stranger would and ask whether it answers their question. That is the check that matters.

Tools used in this article

Read next