Alex Poole

Pragmatic PHP, MySQL, Marketing & Technology

Alex Poole header image 2

Paste-in Keyword Density Calculator

August 11th, 2009 by alex

I just knocked this keyword density calculator together for my own use - there are plenty online that take a URL but I wanted one to automatically show the keyword density for offline documents - in other words I wanted to paste in the entire document, not just the URL.

Here’s the keyword density checker source - as you can see I’m using the standard English stopword list from Ranks.nl

The checker automatically calculates the density of every word and 2, 3 and 4 word phrases, ranking the output by density. It strips punctuation and HTML - I’m sure this bit isn’t perfect but it works most of the time.

I haven’t prettied it up either, but I hope its useful to you as is.

Feel free to use the source for anything you like, with no warranty given or implied. Of course I’d always appreciate a link to www.alexpoole.name if you find it useful :)

Tags:   · · · 13 Comments

Leave a Comment

13 responses so far ↓

  • am very grateful for your ‘paste in’ ap. all others require URL, which but i need to do via txt or paste.
    awesom app w/ keyword generator. any thought given to allowing user to specify the number of words in a string queried (i only find it helpful to determine phrase frequency).
    i’m doing the above because i’m trying to cluster like articles together. is there a free online clustering tool you know of?
    thanks,
    mark

  • Nice script I searched so long for this simple script and I didn’t get any problems. works fine thx for sharing

  • thanks for the tool! Very helpful, can’t wait to check it out.

  • Keyword Density?
    BULLS***T
    I don’t care I have 7 sites to promote a product. I have used the density till 23%. but still I am in top 3. And avoid reading these articles and go through practical. Write for users not for seo, the results will be fine. Ok lets do one practical.
    1. put a keyword
    2. check keyword density for top 5 sites in analyser tool.
    3. See the % will get you more than 10 % sometime.

  • Hi Richard; Thanks for the comment. I didn’t say I placed much faith in KW density, just that this tool does it! I think off-page factors account for 90% of SERPs nowadays anyway.

  • Works great. THanks!

  • let me know which keyword i needed to improve on.

  • this is tidy and easy to repurpose - saved me an hour’s work! thanks! richard

  • Nice script I searched so long for this simple script and I didn’t get any problems. works fine thx for sharing

  • …Richard…
    And you view that as “prrof” - do you?
    When it rains - my tortoise (Barry) always hides under my roses.
    So - when I see Barry under the roses - does that mean it will rain?
    No.

    It’s people making assumptions like that which cause other sites issues.
    There is no known “magic” number for density.
    Same for proximity nor prominence.

    Infact - it is possible to rank for a term that isn’t even in the content!

    So - answer this - if you can rank for a term that is not in the content … how important/influential is Density then?

    Further - Ranking is one thing - convertin another.
    Are you seriously suggesting that you can generate content with such a high %, and it convert well?
    Are you sure that you are not damaging your conversions by making readers think you have a memory problem, or simply poor communication skills?
    Would you trust a company/product/service/person who constantly reiterated?

    As with most parts of SEO - there is NO singular feature that will get you top rankings.
    It’s a mixture of factors.
    And ensuring that you do Not trip a spam flag/fail a revue is kind of key to staying in the rankings.
    Add that to ensuring your content doesn’t read like spam/poo - and density can play a serious part - if only indirectly!

  • I have used a keyword density tool like this before and find it extremely helpful in getting seo effective articles published online. Good article!

  • Hi Alex,

    thanks for sharing this. Some optimization still have to be done for noncharacter ( example &, |, …). But the basic idea is clear so someone can use this to build a great script.

  • [...] on how your keywords are optimized.  One free tool that I found to come in handy for this is Keyword Density Calculator. Also, f you want to start exploring, you can also try another keyword tool that gives you even [...]