Keyword Density: What the Number Means and What It Does Not

How keyword density is calculated, why no search engine publishes a target, and how to use word and phrase counts to edit copy instead of stuffing it.

· 6 min read

Screenshot of RedBison's Keyword Density Analyzer running in the browser

Open almost any SEO plugin from ten years ago and it will tell you your keyword density is "too low" and ask for 2.5 percent. Writers dutifully sprinkle "best running shoes for flat feet" into every third sentence, and the page reads like it was written for a machine, because it was. The machine stopped caring about that number a long time ago. People reading the page never did.

Keyword density is still worth measuring. It is just not worth optimising toward. The difference is what this guide is about.

The formula

Keyword density is the share of all words in a text that are the keyword:

density = occurrences of the keyword / total words x 100

In a 400-word article where "espresso" appears 6 times, density is 6 / 400 x 100 = 1.5 percent. For a multi-word phrase there are two conventions. The common one, used by the Keyword Density Analyzer, counts phrase occurrences over total words, so "espresso machine" appearing 4 times in 400 words is 1 percent. Some tools multiply by the number of words in the phrase (4 x 2 / 400 = 2 percent) on the grounds that the phrase occupies two words each time. Neither is wrong; just compare numbers from the same tool.

Worked keyword density calculation for the sentence "coffee beans and coffee grinders for coffee lovers": 8 words in total, coffee appears 3 times, so density is 3 divided by 8 times 100, which equals 37.5 percent
Worked keyword density calculation for the sentence "coffee beans and coffee grinders for coffee lovers": 8 words in total, coffee appears 3 times, so density is 3 divided by 8 times 100, which equals 37.5 percent

Where the idea came from, and why it stopped working

Early search engines in the 1990s ranked pages largely on what the page said about itself: how often a term appeared, whether it was in the title, the meta keywords tag. Density was a real lever, which made it an easy one to abuse. Pages hid lists of keywords in white text on white backgrounds and repeated phrases dozens of times.

Modern engines rank on many signals beyond the page text, and they understand language well enough that repetition adds nothing after the first few clear mentions. Google's spam policies list keyword stuffing by name: "filling a web page with keywords or numbers in an attempt to manipulate rankings". No major search engine has published a target density, and you should be suspicious of any tool that gives you one as a goal.

What the number is still good for

Three uses survive, and they are all about writing rather than ranking.

Catching repetition. If a word that is not your topic sits at 3 to 5 percent, readers notice. "Really", "simply", "solution" and a product name are common offenders. The analyzer colours single words amber above 2 percent and red above 3 percent, and two-word phrases amber above 1 percent and red above 2 percent, to point at those spots.

Checking the page is clearly about something. If you want a page found for "invoice template" and the phrase appears once in 1,500 words, while "billing document" appears twelve times, you have written a page about billing documents. That might be fine. It should be a decision.

Comparing your copy with pages that already rank. Run a competitor's page through URL mode and look at the top phrases. You are not trying to match their density; you are looking for subtopics they cover that you skipped.

How the counting works, and its blind spots

Counting words sounds trivial. The decisions behind it change the numbers a lot:

DecisionWhat this analyzer doesEffect
CaseLower-cases everything"SEO" and "seo" are one word
Word boundariesLetters and digits in any script; apostrophes inside words kept"café" and "don't" stay whole; "e-mail" becomes "e" and "mail"
Stop wordsRemoves a list of common English words from the top lists"the", "and", "with" never top the chart, but still count toward the total
Short wordsIgnores words of one or two letters in the top lists"AI" and "UX" need the Target Keyword field
PhrasesPairs adjacent words within one sentence"bag of words" never produces a fake "bag words" phrase
Word formsNo stemming"run", "runs" and "running" are three separate keywords

The last row matters most. Search engines treat "running shoes" and "shoes for running" as closely related; a frequency counter sees different strings. Read the top list as a profile of your vocabulary, not as what an engine understands.

Languages written without spaces between words, such as Chinese and Japanese, cannot be split into words by spacing, so the counts are meaningless for them. And in URL mode the analyzer counts the text it extracts from the fetched HTML, including navigation, footers and cookie banners but not text added later by JavaScript, after fetching the HTML through a public CORS proxy. Paste just the article body when you want a clean measurement.

Worked example: editing a product description

Here is a 52-word draft for a coffee grinder:

Our burr coffee grinder is the best coffee grinder for home coffee lovers. This coffee grinder uses steel burrs, so the coffee grinder produces an even grind. Choose from 40 grind settings, from espresso to French press. The grinder is quiet, easy to clean, and the hopper holds 250 g of beans.

Paste it into the analyzer with Target Keyword "coffee grinder". Top Keywords shows "coffee" and "grinder" at 5 occurrences each (9.62 percent), and Top 2-Word Phrases flags "coffee grinder" red at 4 occurrences (7.69 percent), all of them in the first two sentences.

The edit is not to hit a number. It is to write the way you would describe the product to a friend:

A steel burr grinder for home espresso and filter coffee. Steel burrs give an even grind across 40 settings, from fine espresso to coarse French press. It is quiet enough for an early start, comes apart for cleaning without tools, and the hopper holds 250 g of beans.

Run it again. The text is 48 words, "coffee grinder" no longer appears as an exact phrase, and the top words are "espresso" and "steel" at two mentions each. Those still show red, at 4.17 percent, which is the short-sample effect from the first example: on 48 words, any word used twice crosses 4 percent. Ignore the colour here and read the sentences. They now describe the product instead of repeating its category. The page title and main heading can carry the exact phrase, and if you want it in the body, use it once where it reads naturally.

Common mistakes

  • Treating 1 to 3 percent as a target. It was folklore even when density mattered. Write first, then check for repetition.
  • Measuring short samples. On 50 words, every repeated word looks extreme. The numbers settle down on full-length copy.
  • Counting the template. Navigation and footer text inflate certain words on every page. Analyse the content area.
  • Ignoring variants. If "price", "prices" and "pricing" each sit at 1 percent, the concept is at 3 percent.
  • Forgetting the places that do matter. The title, the main heading and the first paragraph tell readers and engines what the page is about far more than the tenth mention in paragraph eight.

Using it alongside other checks

Density is one small signal about copy. The page title and description affect what searchers see before they click; the meta tags guide covers those, and the SEO Meta Tag Generator writes them. For a visual sense of which words dominate a long text, a word cloud of the same copy is a quick second view. Use the analyzer at the end of an edit, look for anything amber or red that is not your actual topic, fix the sentences that sound repetitive when read aloud, and leave the percentage wherever it lands.

Open the Keyword Density Analyzer