The percentage (%) of times a keyword or key phrase appears on a web page in comparison with the total number of words on the page is called keyword density.
Keyword density is calculated as:
(Number of keywords/ Total number of words) * 100
It is good to keep keyword density between 1.5% to 2% to avoid keyword stuffing.