ToolBook
Switch to dark modeSupport us on Ko-fi
Help us keep this free, forever
SEO2 min read

What is keyword density? Formula and how to calculate it

Keyword density is keyword occurrences divided by total words, times 100. The formula, a worked example, and why chasing a target percentage backfires.

ToolBookJun 13, 2026

Keyword density is the percentage of times a keyword appears in a piece of text, calculated as the number of occurrences divided by the total word count, multiplied by 100. If a 500-word article uses a phrase 5 times, its density is 1 percent. The metric tells you how often a term shows up relative to everything else you wrote.

There is no magic target. Modern search engines do not reward a specific density, and stuffing a keyword to hit a number hurts more than it helps. Density is useful in the other direction: as a check for accidental over-use and as a map of which topics your text actually covers.

The keyword density formula

Keyword density (%) = (keyword occurrences / total words) x 100

Worked example: an article is 800 words long and uses "running shoes" 12 times.

12 / 800 = 0.015
0.015 x 100 = 1.5% density

So "running shoes" has a 1.5 percent density. For multi-word phrases, the denominator shifts slightly: a document of N words contains about N single words but only N minus 1 two-word phrases, so phrase density uses the count of phrases of that length as its base.

Why there is no ideal percentage

Old SEO advice quoted a "2 to 3 percent" sweet spot. That guidance is outdated. Search engines now read for meaning, not repetition, and writing to a density target produces text that reads like it was written to a density target. Anything above roughly 3 to 4 percent for a single phrase usually signals keyword stuffing, which can trigger a ranking penalty.

Use density as a guardrail, not a goal: keep your main phrase natural, and check that you have not unconsciously hammered it.

The better use: topical breadth

The more valuable read is which related terms appear and which are missing. If your topic is "React server components" and your main phrase sits at 3 percent while "RSC", "server-rendered React", and "streaming SSR" sit at 0 percent, the article is repetitive without being topically broad. Spreading attention across the whole vocabulary of a topic signals depth far better than repeating one phrase.

SignalWhat it suggests
One phrase above 4%Likely keyword stuffing, dilute it
Main phrase present, synonyms absentThin coverage, add related terms
Even spread across topic termsHealthy, topically comprehensive

Calculate density for your text

Paste your content into our keyword density checker to see 1, 2, 3, and 4-word phrase frequencies at once, with common stop words filtered out so the real terms surface. Pair it with the readability score checker to confirm the writing stays clear, and the word counter for an exact total. For the full set, browse all our SEO tools.