When calculating the density of a keyword phrase, the formula would be (Nkr * Nwp / Tkn) * 100, where Nwp is the number of words in the phrase. So, for example, for a page about search engine optimization where that phrase is used four times and there are four hundred words on the page, the keyword phrase density is (4*3/400)*100 or 3 percent.