Published: April 2026 | Last Updated: April 2026

SEO analytics dashboard on a computer screen

Photo by Atlantic Ambience on Pexels

The Formula

Keyword Density (%) = (Number of keyword occurrences ÷ Total word count) × 100

Basic Keyword Density Formula

The standard keyword density formula calculates the percentage of times a single keyword appears in your content relative to the total word count:

Formula

(Keyword Count ÷ Total Words) × 100

Example

15 occurrences in 1,000 words = 1.5% density

This formula works for single words. For multi-word phrases, the calculation is slightly different.

Multi-Word Phrase Density

When calculating density for a phrase like “keyword density checker” (a 3-word phrase), you need to account for the number of possible phrase positions in your text:

Phrase Density (%) = (Phrase occurrences ÷ Total word count) × N × 100

Where N is the number of words in the phrase. However, in practice, most SEO tools use the simpler formula (occurrences ÷ total words × 100) even for phrases, and that’s the number you should optimise against.

Worked Examples

Content LengthKeyword AppearancesDensityAssessment
500 words3 times0.6%Slightly low — consider adding 1–2 more natural mentions
1,000 words12 times1.2%Healthy — well within the natural range
1,500 words25 times1.7%Good — thorough coverage without overdoing it
2,000 words60 times3.0%Borderline high — review for keyword stuffing
3,000 words150 times5.0%Too high — definitely reduce, reads unnaturally

Beyond Basic Density: TF-IDF

TF-IDF (Term Frequency – Inverse Document Frequency) is a more sophisticated way to measure keyword importance. Instead of just counting how often a word appears in your content, it compares that frequency against how commonly the word appears across all documents on the web.

A high TF-IDF score suggests the word is genuinely important to your content, not just a common word like “the” or “is” that appears frequently everywhere. Modern SEO tools often use TF-IDF analysis alongside basic keyword density for more meaningful insights.

Quick Density Calculator

Use this reference table to quickly find your target keyword count based on content length and desired density:

Content Length0.5% Density1.0% Density1.5% Density2.0% Density
500 words2–3 times5 times7–8 times10 times
1,000 words5 times10 times15 times20 times
1,500 words7–8 times15 times22–23 times30 times
2,000 words10 times20 times30 times40 times
3,000 words15 times30 times45 times60 times

For a more precise analysis, use our Keyword Density Checker to paste your content and see exact density figures for every word and phrase.

Count Your Words Now

Paste your text into our free word counter tool to instantly count words, characters, sentences, paragraphs and pages.

Open Word Counter

Frequently Asked Questions

What is the keyword density formula?

The keyword density formula is: (Number of keyword occurrences ÷ Total word count) × 100. This gives you a percentage representing how frequently your keyword appears relative to the total content.

How do I calculate keyword density for a phrase?

For multi-word phrases, most SEO tools use the same formula: (phrase occurrences ÷ total word count) × 100. For example, if ‘content marketing’ appears 8 times in a 1,000-word article, the density is 0.8%.

What is TF-IDF and how does it differ from keyword density?

TF-IDF (Term Frequency – Inverse Document Frequency) measures how important a word is to a document compared to all documents. Unlike simple keyword density, TF-IDF accounts for how common a word is across the web, giving more weight to unique, topic-specific terms.

Should I use keyword density or TF-IDF for SEO?

Use basic keyword density as a quick sanity check (0.5–2.5% range), and TF-IDF analysis for deeper content optimisation. Many professional SEO tools combine both approaches for comprehensive analysis.

Related Tools & Guides

Further Reading