Many SEO experts consider the optimum keyword density to be 1 to 3 percent; more could be considered search spam. The formula to calculate your keyword density on a web page for SEO purposes is. , where Nkr is how many times you repeated a specific keyword, and Tkn the total words in the analyzed text.