Word density in SEO, what it is and how to calculate it

Word density in SEO what it is and how to calculate it
Home » Technology » Seo » Word density in SEO, what it is and how to calculate it

Table of contents

Word density is one of the variables in search algorithms to determine the SEO score of a given website. It is part of SEO On Page and there are two types: global and local.

What is global word density

How many times a keyword is repeated throughout an entire website. The formula is “number of repetitions / total number of words on the website”.

If we want to position a website for a few key terms, it would be convenient for these terms to appear on as many pages as possible on our website.

The terms cannot be many because, for mathematical reasons, the greater the number of key concepts that we want to position in a general way, the lower the density of words each of them will have.

What is local keyword density

It is the same as the previous one but, instead of calculating the number of keywords for a complete web page, we calculate it for a specific page. The formula is “number of times it appears on a specific page / total number of words on said page”.

We must keep in mind, as before, that, for mathematical reasons, the more words we try to position, the worse the density will be in each of them. Therefore, as a recommendation for word density, it is best to focus on a few words and try to use them throughout the domain and on individual pages.

What is phrase density or keyphrase

The difference between a keyword and a keyphrase is the number of elements that make them up, while the first is made up of only one word, the second is made up of more than one term.

The biggest difference is found when establishing a formula to calculate it, we can say that the density for a phrase or keyphrase is “(number of terms in the phrase * number of times the phrase appears) / number of words in the document or complete website”. Later we will see an example of how to use this formula.

How to calculate global word density

To know the global density, that is, throughout the website, we can do a simple Google search:

site:stackoverflow.com "seo”

This search returns the number of pages that contain the key term “SEO” (for example 2).

site:stackoverflow.com

This search returns the total number of indexed pages of the website (for example 50).

Therefore, approximately, to calculate the global word density we will divide the first value by the second multiplied by 100. Following our example, the result will be (2/50) * 100 = 4%, that is, 4 of each 100 pages contain the term SEO.

However, this is not a completely correct calculation, the ideal would be to count the number of times the word “seo” appears throughout the website and the number of total words and calculate with the previously mentioned formula, that is, “(number of repetitions / total number of words on the website) * 100”.

How to calculate local keyword density

Since it is a specific page, we can do it a little more manually, for example, using any text editor that tells us the total words and the keywords that we want to analyze.

We just have to divide, as before, the searched word / total number of words in the article and multiply it by 100 to obtain the local keyword percentage.

How to calculate the density of phrases or keyphrase

In the same way as the two previous examples, we must keep in mind that this formula can be applied both globally and locally.

Suppose we have the following text:

quick brown fox
a little pig
quick brown fox

What is the density for the phrase “quick brown fox”? At first glance we can see that it occupies 2/3 of the entire text and, therefore, its density is 66%.

Therefore, to calculate the density of phrases or keyphrase, if we apply the previous formula, we can see that this is true:

“(number of terms in the phrase 
* number of times the phrase appears)
/ number of words in the document or complete website”
= (3*2)/9 = 66.66%.

However, another possible formula could be “number of times the phrase is repeated / total length of the text” and, therefore, we would have 2/9*100 = 22%. I personally do not like this formula since, as I said, at first glance we can see that the first sentence occupies 2/3 of the text.

As you can see, and since the search engine algorithm is not public, there are certain things that we do not know with certainty and we have to guess, make assumptions and create the best possible approximation.

Optimal values and percentages in word density

As we commented in previous articles, the better the global and local density, the better our SEO will be, but with the caveat that we should not exceed it because we may be penalized. Regarding SEO penalties for word density, two notes:

  • Google penalizes from, more or less, and, according to certain sources, 3% density, however others comment that it is 5%, who knows. This is done to avoid abuse, imagine a post with 99% density, it would mean that 99 out of every 100 words are the same and this, as we already mentioned, is not quality content, but content aimed solely at attracting traffic to generate profits.
  • The optimal word density value depends on the density of our competitors with terms similar to those we intend to use to position ourselves. We will try to be above them without exceeding 5%, although as we have already said, this is not an exact science.

Tools to check keyword and keyphrase density

Since the way in which we have measured the density is quite manual and, for large websites, it is not feasible to analyze them in that way, there are websites on the market to check the density of words automatically:

  • SeoReviewTools. Partially free tool that allows you to analyze a website given its URL or manually entered text. It has a simple interface and has a payment API to automate and develop applications.
  • SmallSeoTools. Similar to the previous one, it also has free and paid plans.
  • Semrush. Very limited tool if we do not have the payment plan, although more complete and professional.

There are many tools to analyze density. It is enough to do a brief search on the internet and we will find a multitude of websites to analyze density.