Enter a URL
To calculate keyword density in its simplest form, you divide the number of times that you have used a specific keyword by the total number of words in the text that you are analyzing and multiply the result by one hundred to achieve your percentage.
There is no ideal or exact percentage for better ranking. Personally, 1-3% of keyword density along with “semantic keywords” and LSI keywords works best for me. Google suggests to write natural articles. Again, there is no ideal percentage, but placing your keyword in natural places will work the best.