>What is the "perfect" percentage?
I wish I knew ;)
What I do is try and find pages that rank well on competitive terms and are obviously unoptimised. If you can find enough of them to analyse it will give you an insight into the best range for your density.
As an example a search for "loans" at Google returns a very interesting result at position 13, this is the type of page that may warrant an in-depth look.
As metaman points out there are also "off page" criteria that need to be considered, but if you concentrate on getting the individual pages right it will be a good start.
Google loans [google.com]
I would say that the key is that you have enough data to analyse and try not to jump to conclusions based on a handful of results.
Also of importance is the "mix" of elements on the page, Title, H tags, href text, bold etc and the densities of those. I look at single and multiple keyword searches and treat these as being different.
Of course the biggest problem faced with this type of analysis is that you are only finding out what a certain SE likes at the moment, try and have a good mix of pages within the site to cover yourself when the algo changes.
Brett has a Keyword Density Analyzer here. [searchengineworld.com]