Keyword density refers to the percentage of times a keyword appears in a piece of content compared to the total word count. It is calculated by dividing the number of times a keyword appears by the total word count and multiplying by 100.