I didn't think anyone would share how they calculate word density... so I will share a not as detailed version of how I do. Before I do that.. i want to say I very much agree that content should be about value first... that being said, what good is content if it is not being read? An example... When I am looking up information about most any topic, I very rarely read the pages on the first page of serps. I will dig into pages 5 7 10... this is where the really good stuff more often than not can be found.. why? because someone is sharing real value on a subject, but has no clue about SEO principles. No elements of SEO, and the serp rank sucks.
In a nutshell how I calculate keyword density.. I first will look at the code of the page, and do a count of how many times my target keyword is present throughout the the entire page ( I use the "find" function to do this count). I then take that number and divide it by the total number of words with in the text portion ( < p > ) of the page. ( you can get this number by inserting the text into word without actually counting the words ) This gives you a percentage that as I see it would be your keyword density.
Lets say i have a 500 word document and I want a 1.4 percent keyword density, that would mean that i need that term to appear 7 times within the code of the page. the 7 obvious places would be
1. The URL
2. The Title
3. The primary H1 tag
4. Within the first portion of text
5. An Img file name
6. The Image alt tag
7. later in the text
An issue you run into when running such a low keyword percentage becomes Keyword Proximity. the top portion of your code is going to be keyword heavy. Going to something like 1.8% or 9 instances of the keyword, then looks like this:
1. The URL
2. The Title
3. The description Tag
4. The primary H1 tag
5. Within the first portion of text
6. An Img file name
7. The Image alt tag
8. Towards the middle of the text
9. Towards the end of the text
When you look at it this way, the actual text is not so keyword loaded... and like I said, I am all for the overall end user value of the content.
As you get more in detail with the concepts of keyword density you begin to understand there are some other factors at play. inner site linking using the keyword term as anchor text and back linking with the use of the keyword term as anchor would be 2 examples of this.
The actual percentage itself that you would use depends on many factors. One you can get away with in one market space / niche, may not hold true in another. I do find that local based SEO is far more forgiving. It simply is something you have to play with and test to determine the best results.