SEO Keyword Density: Formula, Examples and Safe Ranges

November 11, 2026 · 10 min read

SEO Keyword Density: Formula, Examples and Safe Ranges

SEO keyword density is the percentage of words on a page taken up by a keyword: divide the keyword's uses by the total word count and multiply by 100. Ten uses in 1,000 words is 1%. This guide works the numbers, explains why tools disagree, and covers what Google has actually said.

What is keyword density in SEO?

Keyword density measures repetition. It tells you how often a word or phrase appears relative to everything else on the page, and nothing more. It can't tell you whether the page answers the query, matches search intent, or reads well.

That's why keyword density for SEO works best as a check, not a goal. A density of 0% on your main topic means you never named it. A density of 8% usually means the text reads like it was written for a crawler, not a person. Everything in between still needs a human read.

Picking which keywords to target is keyword research, a separate job this guide doesn't cover.

The keyword density formula, with worked numbers

The standard formula is short:

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

Count every time the keyword appears, count every word in the text, divide, and multiply by 100. Here's how that plays out at common article lengths:

OccurrencesTotal wordsDensity
55001.0%
101,0001.0%
155003.0%
81,6000.5%

The same number of uses means very different things at different lengths. Fifteen mentions in a 1,500-word guide is 1%; in a 500-word product page it's 3%. Short text swings hardest: in a 50-word paragraph, a single mention is already 2%.

How to calculate keyword density for a multi-word phrase

Single words are easy. Phrases are where tools quietly split into camps, because there are three defensible ways to do the maths. Take a three-word keyword, markdown table generator, used 6 times in a 1,200-word article:

MethodCalculationDensity
Occurrences over total words6 / 1,200 x 1000.50%
Words occupied by the phrase(6 x 3) / 1,200 x 1001.50%
Adjusted total (phrase counted as one word)6 / (1,200 - 6 x 2) x 1000.51%

The first method treats each use of the phrase as one hit. The second counts how many of the page's words belong to the phrase, so a three-word keyword reads three times higher. The third shrinks the total so the phrase counts as a single word. The Wikipedia article on keyword density describes all three.

None of these is wrong, but they aren't comparable. If one checker says 0.5% and another says 1.5% for the same text, check which method each uses before you edit anything. Our keyword density checker uses the first: occurrences divided by total words.

Matching rules matter too. A simple counter only finds the exact word sequence, so markdown table generators or generator for markdown tables may not count at all. That's fine: variants still help readers and search engines, they just don't show up in the percentage.

Why two keyword density checkers give different numbers

Even with the same formula, two checkers can report different figures for one page. The differences come from how each tool builds its word list before it divides anything:

  • Stop words. Some tools drop words like the, and and of from the total, which raises every percentage. Others hide them from the tables but keep them in the count.
  • Case and word forms. One tool counts Keyword and keyword separately, another merges them. A tool that stems words may also merge keywords with keyword.
  • Minimum word length. Some tools hide very short words, such as those under three letters, and a few also leave them out of the total.
  • Tokenising. Hyphens, numbers, apostrophes and URLs get split differently. A link URL can add five or six "words" to a naive count.
  • What's on the page. A checker that reads a live URL may include navigation, footer links, image alt text and cookie banners. Pasted text contains only what you pasted.

Our checker keeps stop words in the total even when Exclude stop words hides them from the word table. Its Min. word length setting only hides short single words, and phrases are unaffected. So if you compare its numbers with another tool's, expect a gap and look at these settings first.

What has Google said about keyword density?

Google has never published an ideal SEO keyword density. What it has published is a definition of the opposite problem. Its spam policies describe keyword stuffing as filling a page with keywords or numbers to manipulate rankings. One listed example is "repeating the same words or phrases so often that it sounds unnatural."

The SEO Starter Guide goes a step further. It lists keyword stuffing among the things not to focus on and calls excessive repetition, even in variations, tiring for users. The same guide suggests thinking about the different words readers use for a topic, and says Google's language matching can connect a page to queries it doesn't spell out.

Google's people-first content guidance makes a parallel point about length. It treats writing to a target word count as a warning sign and states that Google has no preferred word count. There's no equivalent page that blesses a density figure, so treat any "Google recommends X%" claim with suspicion.

How many keywords per 1,000 words is safe?

Because Google publishes no target, any range you see is a rule of thumb. A range many SEO guides quote for a primary keyword is 0.5% to 2%, and our checker's own help text uses the same range. In a 1,000-word article, that works out to 5 to 20 uses of the exact keyword.

Treat the bottom of that range as a reminder to name your topic and the top as a soft ceiling. Google hasn't said that 2% ranks better than 1%, and we know of no evidence that it does. Plenty of pages rank with a lower figure, often because they use synonyms and related phrases instead of the exact term.

We prefer to treat density as a stuffing alarm rather than a target. When a single phrase climbs above about 3%, we reread every sentence that contains it. Usually two or three of them can say "it" or use a variant without losing anything.

How do you improve keyword density without stuffing?

If your keyword is missing, put it where readers look first instead of sprinkling it everywhere. That means the title or H1, the opening paragraph, one or two headings, and the close. Our guide to Markdown headings covers how to structure those headings cleanly. One place to skip is the keywords meta tag, which Google doesn't use, as our meta tags guide explains.

If your keyword is overused, don't just delete it. Rewrite the sentences so the topic carries itself through pronouns, shorter references and related terms. Here's an over-optimised paragraph targeting static site generator:

A static site generator is the fastest way to build a blog. Our static site generator guide shows you how to pick a static site generator, install a static site generator and deploy your static site generator to any host. With the right static site generator, your static site generator blog loads fast.

That's 7 uses in 53 words, a density of 13.2%. It reads like a list of search terms. Here's the same idea rewritten:

A static site generator turns Markdown files into plain HTML pages, which is why blogs built on one load fast. This guide shows you how to pick a generator, install it and deploy the output to any host. Hugo, Jekyll and Eleventy all follow the same pattern: templates and content go in, finished pages come out.

Now it's 1 use in 56 words, or 1.8%. The paragraph is longer, says more, and names real tools that searchers also type. The keyword still appears in the first sentence, where it does the most work.

Measuring SEO keyword density in a Markdown draft

Markdown adds a twist: the raw file isn't what readers see. Front matter, link URLs, image syntax and code blocks all change the word count. Here's a short draft:

---
title: Static site generator setup
description: Install a static site generator in ten minutes.
---

# Static site generator setup

Install [Hugo](https://example.com/docs/install) and run one command:

```bash
hugo new site my-blog
```

![Hugo welcome screen](https://example.com/img/welcome.png)

Your static site generator is ready to build pages.

Count it three ways and you get three answers for static site generator:

What you countWordsUsesDensity
Whole file, split on spaces4548.9%
Whole file, split on letters and digits5347.5%
Only the prose a reader sees19210.5%

The sample is tiny on purpose, so the percentages are high. The lesson holds at any length, though: syntax can push the number up or down, and you can't predict which way without stripping it.

For an honest figure, measure the prose. Our keyword density checker runs in your browser, and with Ignore markdown syntax on it removes front matter, fenced code blocks, link URLs, images and HTML tags before counting. Inline code loses its backticks but its words still count.

Type your phrase into Target keyword and it reports the count, the density, and whether the phrase appears in the title, in a heading and in the first 100 words. The tables export as CSV, so you can compare drafts.

Front matter is a judgement call. Its title often becomes the page title, but the description field usually isn't body text. Our checker leaves front matter out of the word count but still reads its title for the in-title check. Our front matter guide explains what each field does. Whatever you decide, measure every draft the same way, which a shared Markdown style guide makes easier.

One limitation to keep in mind: the checker's stop-word list is English only, and no density figure tells you anything about search intent or where a page will rank.

SEO keyword density is easy to calculate and easy to misread. Use the formula to spot a missing keyword or an overused one, check which phrase method and word list your tool uses, and keep the final call with your ear. Draft and preview your article in the editor, then paste it into the keyword density checker to measure the prose readers will actually see.