How Is Keyword Density Calculated? A Worked Example

Count keyword and phrase frequency in pasted content.

How Is Keyword Density Calculated?

Keyword density is calculated by dividing the number of times a keyword appears by the total word count, then multiplying by 100. For example, four appearances of “SEO” in a 200-word article produce a density of 2%. The calculation is straightforward for one word, but multiword phrases, punctuation, and different text-counting rules can produce different percentages. Use the result to understand repetition, not as a guaranteed SEO ranking target.

Keyword Density Checker

Count keyword and phrase frequency in pasted content.

Keyword Density Checker thumbnail

Check keyword frequency in your text

Density = exact whole-word phrase occurrences divided by total word count × 100. Word counts include repeated words; phrase matches may overlap. This is descriptive, not a recommended SEO density target.

Rate this tool Not rated yet. Be the first to rate this tool.

Calculate Keyword Density and Interpret the Result Correctly

A keyword density percentage seems simple until two tools analyze the same page and return different numbers. One might count a search term in headings and body text; another might count a menu, footer, repeated template text, or a partially matching word. The percentage changes because the counting rules change, even when the writing does not.

This guide separates the arithmetic from those measurement decisions. You will calculate a single-word example, compare two methods for phrases, learn why word counts disagree, and decide what the number can actually tell you about the quality of a page. For a practical check, use the Keyword Density Checker above and compare its displayed measurements with a known sample.

Keyword density calculation with sample word count and occurrences
Keyword density is a frequency calculation, not a Google ranking target.

The Basic Keyword Density Formula

For a single word, the common formula is keyword density (%) = (keyword occurrences ÷ total words) × 100. An occurrence is one match to the term you are checking, and total words means all the words in the text scope selected for analysis. The two counts must describe the same passage or page section for the ratio to be meaningful.

Suppose a draft contains 200 words and the standalone word “SEO” appears four times. Dividing 4 by 200 gives 0.02. Multiplying by 100 produces 2%. That is the entire calculation; the hard part is deciding exactly what should count as an occurrence and as a word.

Calculation step Value Interpretation
Count all words 200 Denominator for the selected text
Count “SEO” as a whole word 4 Numerator
Divide occurrences by words 4 ÷ 200 = 0.02 Raw frequency ratio
Convert ratio to percent 0.02 × 100 = 2% Single-word density

Worked Example: Compare Two Drafts of Different Lengths

Imagine Draft A has 500 words and contains “internal links” five times. Draft B has 1,000 words and uses the same phrase ten times. Under a phrase-occurrence formula, Draft A has 5 ÷ 500 × 100 = 1%, while Draft B has 10 ÷ 1,000 × 100 = 1%. B repeats the phrase twice as often in absolute terms, but both drafts have the same relative occurrence rate.

Now consider a 200-word paragraph that uses the single word “audit” 12 times. Its density is 12 ÷ 200 × 100 = 6%. That tells you the word is relatively frequent; it does not establish whether the paragraph is useful, repetitive, or spammy. A technical troubleshooting passage may need a repeated term, while a short sales paragraph may sound unnatural with far fewer repeats. Read the surrounding sentences before changing them.

Why Multiword Keyphrases Have More Than One Percentage

The formula is less universal when you count a phrase such as “technical SEO.” Suppose the exact two-word phrase appears three times in a 200-word text. Under the phrase-occurrence method, you treat each complete phrase as one match: 3 ÷ 200 × 100 = 1.5%.

A different method measures how many words belong to those matched phrases. Three appearances of a two-word expression occupy six word positions, so phrase word coverage is (3 × 2) ÷ 200 × 100 = 3%, assuming there is no overlap. Both results describe the same passage using different definitions. Some SEO systems use further weighting or matching rules, so do not assume every displayed “keyphrase density” uses either exact formula.

Method Numerator Result for “technical SEO”
Phrase occurrences 3 complete phrase matches 3 ÷ 200 × 100 = 1.5%
Word coverage 3 matches × 2 words = 6 6 ÷ 200 × 100 = 3%
Plugin-specific keyphrase score Depends on plugin matching and weighting Confirm the plugin’s documented method

This distinction matters when you compare one-word and four-word targets. A long keyphrase can consume much more of the text without being repeated often. For recurring combinations, the N-gram Keyword Analyzer is a useful complementary way to inspect word sequences, but its output should not be confused with a universal density formula.

Which Words Are Actually Counted?

Two word counters can disagree over the same text without either making a mathematical mistake. They may split terms at different boundaries. For example, one counter treats search-engine as one token, while another splits it into two. Apostrophes, numbers, Unicode characters, hashtags, and URLs create similar questions. Case-insensitive matching might count “SEO” and “seo” together, while strict matching might not.

  • Whole-word versus substring matches: “rank” should not automatically match the letters inside “ranking” unless the tool intentionally uses stemming or partial matching.
  • Exact phrase versus loose phrase: “keyword density” and “density of keywords” express related ideas but are not exact character sequences.
  • Hyphens and punctuation: “on-page SEO” may be tokenized as two or three words depending on the software.
  • Plural forms: “page” and “pages” may be counted separately or grouped by an advanced analyzer.
  • Page sections: Including navigation labels, sidebars, captions, product cards, or footer copy changes the total count.

When comparing drafts, use the same counting convention and the same text scope. A percentage calculated from only the article body cannot be compared fairly with a result calculated from every visible word on the entire page.

Using a Keyword Density Checker Without Misreading It

The SEOToolCheckers inventory assigns this article the Keyword Density Checker and the registered shortcode shown above. On the public tool page that could be located during research, the older interface describes a URL-based analysis and lists total words, term frequencies, and percentages. Because the new 123-tool interface could not be independently tested, confirm its actual input options and result labels in WordPress before promising additional features.

  1. Choose the text or page you want to assess and note its exact scope.
  2. Run the checker using the input format it currently supports.
  3. Record the total word count and the count for your target word or phrase.
  4. Manually calculate a small example to confirm how its percentage is defined.
  5. Review surrounding sentences if the result suggests unusually frequent repetition.

For copy pasted out of HTML, an HTML-to-Text Converter may help you inspect visible wording separately from markup, but stripping HTML can change which text is retained. The Readability Checker addresses a different question: whether people can comfortably follow the content. Neither tool provides a ranking guarantee.

Is a Keyword Density of 1%, 2%, or 3% Better?

No percentage is universally best. Google stated in a January 2023 Search Central office-hours answer that it does not have an optimal keyword density. Its spam policies also identify excessive, unnatural repetition intended to manipulate rankings as keyword stuffing. These statements are compatible: it is useful to name your subject clearly, but repeating a phrase to reach a target number is not an effective content goal.

Think of density as a descriptive editing diagnostic. If a sentence reads awkwardly because the identical phrase has been inserted repeatedly, revise it. If a detailed guide naturally repeats a necessary technical noun, do not remove it just to bring a percentage down. Clear headings, accurate definitions, relevant examples, and complete answers are more useful editing priorities than chasing a green score.

The related editorial guide on when similar keywords need separate pages addresses topic overlap, which is a different issue from repeating a word within one page. Do not create separate URLs merely to avoid using a related phrase in the same article.

When a High Count Is Useful and When It Is a Warning

A frequency result helps you find wording worth inspecting. A glossary entry about XML sitemaps may correctly repeat “sitemap.” A sales page that jams the same long-tail query into every heading is less likely to read naturally. The distinction is not the final percentage but whether the repetition helps users understand the subject.

For a manual audit, identify the five most frequent meaningful terms, ignore common stop words where appropriate, and read each occurrence in context. Ask whether the paragraph adds a new fact or merely rephrases an earlier sentence. The Text Cleaner and Formatter can help prepare messy draft text for inspection, while the Keyword List Grouper serves a separate job: organizing research queries by related topics.

Common Calculation Mistakes

Mistake Why it changes the answer Better approach
Counting a phrase as one and as two words interchangeably The numerator changes Label the chosen method
Including headings for one draft but excluding them for another The denominator changes Use consistent content boundaries
Matching part of another word The occurrence count inflates Use whole-token matches where intended
Dividing by the number of sentences Measures a different ratio Divide by word count
Using the percentage as a ranking threshold Confuses measurement with SEO quality Evaluate usefulness and natural writing

Questions About Keyword Density

Does keyword density include headings?

It may. A checker analyzing the full content area can count heading words, while a body-only calculation may exclude them. Check the tool’s content boundaries before comparing numbers.

Can keyword density be more than 100%?

Not under a straightforward single-word frequency formula with non-overlapping whole-word matches: each occurrence contributes at most one counted token. Unexpectedly larger figures usually signal that a different score or counting method is being shown.

Should I count synonyms as keyword occurrences?

Not for an exact-match density calculation. Synonyms can support a clearer explanation, but they are distinct expressions. A semantic analysis tool may group them for a different purpose.

Does a low density mean Google cannot understand the page?

No. A clear page can communicate its subject through headings, definitions, examples, and ordinary language without repeating an exact phrase many times. Still, avoid being so vague that neither readers nor search systems can identify the topic.

Make the Number Serve the Reader

To calculate density, count the occurrences, divide by the word count, and multiply by 100. Then write down the matching rules that produced those counts. The finished number can help detect repeated wording, but it should never replace an editorial review. If the article answers a real question clearly and accurately, that matters more than hitting a particular keyword percentage.