Keyword density is the share of a text taken up by a particular word or phrase. It is easy to measure, which is probably why it became popular, but it is a description of text, not a lever for rankings.
The formula
The usual formula is:
density = occurrences ÷ total words × 100
If “plain text” appears 3 times in a 150-word article, its density is 3 ÷ 150 × 100 = 2%.
Some tools use a variant for multi-word phrases that multiplies occurrences by the number of words in the phrase (3 × 2 ÷ 150 × 100 = 4%), on the basis that the phrase occupies that many words. Neither is wrong, but results from different tools aren’t comparable unless you know which formula they use. The Keyword Density tool on this site uses the first formula.
Other details also vary: whether matching is case-sensitive, whether “tool” matches “tools”, and whether stop words are counted in the total.
What search engines say
There is no published keyword density target. Early search engines relied heavily on word matching, which encouraged repetition; modern search systems use language understanding that recognizes synonyms, related concepts and context. Google’s spam policies explicitly list keyword stuffing, filling a page with keywords in an attempt to manipulate rankings, as a practice that can cause a page to rank lower or not appear at all.
Advice that a page needs “1–2% density” or any other specific figure isn’t based on anything search engines have published.
How density is useful
As an editing aid, density and frequency tables are genuinely helpful:
- Spotting unintended repetition. If a phrase appears far more often than anything else, the text may read as repetitive.
- Checking focus. The most frequent content words usually reflect what a text is about. If they don’t match your intended topic, the text may be wandering.
- Comparing drafts before and after editing.
A better approach
Write for the reader first. Use the words your audience uses, name the topic clearly in the title and early in the text, and use natural variations and related terms rather than repeating one exact phrase. Then use a density or frequency tool to catch anything that repeats more than it should.