Keyword density is how many times the focus keyword appears compared to the total amount of words.
To determine the keyword density, we can use the following formula:
(Nkr / Tkn) * 100
Where Nkr is how many times you repeated a specific keyword and Tkn is the total amount of words.
The optimum keyword density is 1 to 3 percent.
Having your focus keyword appear to many times may signal that the web page is spam and therefore result in a lower or no ranking.