TF-IDF Calculator: Free Keyword Score Checker

TF-IDF Calculator

Calculate TF-IDF scores for your content. Add multiple documents (competitor pages) to calculate IDF and find semantically important terms.

This free TF-IDF calculator scores the words in your page against one or two competitor pages and ranks the 30 terms that stand out most in your content. It is made for SEO writers and editors who want to see which keywords make their copy distinctive, with TF, IDF and TF-IDF values shown for every term.

What Is TF-IDF?

TF-IDF, short for term frequency-inverse document frequency, is a score that shows how strongly a word characterizes one document compared with a group of documents. A word scores high when you use it often and few of the other documents use it. The method comes from information retrieval and natural language processing, and many text-weighting systems build on it.

Term frequency (TF)

Term frequency is how often a word appears in your target text, divided by the total number of words counted in that text. If a word appears 6 times in 200 counted words, its TF is 0.03.

Inverse document frequency (IDF)

Inverse document frequency measures how rare a word is across all the documents you paste. This calculator uses a smoothed version: IDF = ln((N + 1) / (df + 1)) + 1. Here N is the number of documents and df is how many of them contain the word. A word found in every document gets an IDF of 1, and a word found only in your page gets the highest value.

The final score

The TF-IDF score is TF × IDF. It rises when a word is frequent in your text and few competitors use it, and it falls back toward plain TF when everyone uses the word.

How to Use the TF-IDF Calculator

You need your own page text and at least one competitor page to get a meaningful comparison. The steps take about two minutes.

  1. Copy the visible body text of your page and paste it into the Target Document (your content) box.
  2. Copy the body text of a page that ranks for the same topic and paste it into the first Reference Documents box, labeled "Paste competitor page 1 content here...".
  3. Optional: paste a second ranking page into the next box, "Paste competitor page 2 content here (optional)...".
  4. Click Calculate TF-IDF.
  5. Read the results table, which lists rank, keyword, count, TF, IDF and TF-IDF score for the top 30 terms from your page.
  6. Edit your draft, paste it in again and recalculate to see how the ranking changes.

If the target box is empty, the tool asks you to enter your target content before it calculates. Paste article text rather than raw page code. If you need the headline structure of a competitor first, the Heading Structure Extractor pulls it out quickly.

TF-IDF Calculation Example

A worked example shows why the same word count can produce different scores. Say your target page has 200 counted words and you paste two competitor pages, so N is 3.

WordTF and IDFTF-IDF
schema (6 times, only your page)0.0300 and 1.69310.0508
markup (4 times, your page and 1 competitor)0.0200 and 1.28770.0258
guide (6 times, all 3 pages)0.0300 and 1.00000.0300

For "schema", df is 1, so IDF is ln(4/2) + 1 = 1.6931, and the score is 0.03 × 1.6931 = 0.0508. For "guide", df is 3, so IDF is ln(4/4) + 1 = 1, and the score equals its TF of 0.03.

Both words appear 6 times, yet "schema" ranks higher because neither competitor uses it. That tells you "schema" is a distinctive part of your page, while "guide" is common ground.

How Do You Read the TF-IDF Results?

Read the table from the top: the highest TF-IDF scores are the words that define your page most strongly compared with the pages you pasted. The five highest ranks are highlighted so your most distinctive terms are easy to spot.

  • Count is the raw number of times the word appears in your text.
  • TF is that count divided by your total counted words.
  • IDF is the rarity value across your pasted documents.
  • TF-IDF Score is the product, and the ranking order.

What good and poor results look like

A good result puts your core topic words at the top. A page about trail running shoes should rank words like "trail", "cushioning" and "outsole" high. A poor result puts generic words such as "website", "tips" or "service" at the top, or leaves your main topic word far down the list.

The fix is usually editorial: work the missing topic words into headings, intro text and body copy where they fit naturally, then recalculate.

Why the IDF range is narrow

Because the formula adds 1, IDF never drops below 1. With three documents it runs from 1.0 to about 1.69, and with two documents from 1.0 to about 1.41. If you paste only your own text, every IDF is 1 and the score equals TF. So frequency still drives the ranking, and adding references only boosts words your competitors skip.

How to find terms you are missing

The table only scores words that appear in your target text. To see what a competitor emphasizes that you do not, swap the roles: paste the competitor page as the target and your page as a reference. Their top terms that are absent from your copy are your content gaps.

Who Should Use a TF-IDF Calculator?

Anyone who writes or edits web copy and wants evidence about wording, not guesses, can use it. Typical situations include:

  • Content briefs: compare a draft with the top two ranking pages before you hand it to an editor.
  • Content refreshes: check an aging article to see whether its key terms are still the ones that stand out.
  • Competitor research: see which words a rival page leans on most.
  • Learning and teaching: students of NLP or information retrieval can check hand calculations against a clear table.
  • Meta writing: pick distinctive words for a title or description, then preview them with the Google SERP Snippet Preview.

Best Practices and Common Mistakes

Better inputs give more reliable results. These habits keep your comparison honest.

  • Compare like with like. Use competitor pages that target the same search intent as yours, not a homepage or a product listing.
  • Paste the main content only. Menus, footers, cookie notices and sidebars repeat across pages and distort counts. If you are unsure how much of a page is real text, the Code to Text Ratio checker shows how much of its HTML is readable copy.
  • Use a similar length. A 300-word page against a 3,000-word page makes TF values hard to compare.
  • Do not stuff words. Repeating a term to raise its score makes copy read badly. Add a word only where it genuinely fits.
  • Check your structure too. After adding terms, confirm your headings still read cleanly with the HTML Headings Checker.
  • Add reference pages when you can. One reference gives a weak IDF signal, and two give more variation.

Troubleshooting a surprising result

If a word you used often is missing, check its length and spelling. If your brand name tops the list, that is normal, since competitors rarely use it. Ignore it and look at the next terms. If every score looks similar, your references probably share most of your vocabulary, which means your page is not very distinctive.

Limitations to Keep in Mind

This is a content analysis aid, not a ranking score. Google has not said it ranks pages by TF-IDF values, and modern search engines weigh far more than word statistics. Related methods such as BM25 also adjust for document length, which this classic calculation does not.

  • It scores single words only, not phrases.
  • It skips words shorter than four letters, so "SEO" and "CSS" never appear, and it skips common filler words.
  • It reads only the letters a to z and digits, so accented characters split words apart.
  • It does not merge word forms, so "tool" and "tools" are counted separately.
  • It shows the top 30 terms and accepts one target plus up to two reference pages.

Other calculators and code libraries use different word lists and formulas, so their numbers will not match exactly.

Turn the Scores Into Better Content

Use the results to decide which topic words your page needs more of, which ones it already owns, and which ones competitors cover that you skip. Once the copy is solid, you can mark up its questions with the FAQ Schema Generator, and you can find more checks in the On-Page SEO & Meta Tags tools. Paste your content into the boxes above and run the calculation to see your top terms now.

Frequently Asked Questions

What is TF-IDF used for?
TF-IDF is used to find which words best characterize a document compared with others. In SEO, it helps you spot distinctive topic terms in your page and gaps against competitor pages, so you can improve wording.
How do you calculate TF-IDF?
Multiply term frequency by inverse document frequency. TF is a word's count divided by total counted words. This calculator uses IDF = ln((N + 1) / (df + 1)) + 1. For example, 6 uses in 200 words, found in 1 of 3 documents, scores 0.0508.
How many documents do I need for the TF-IDF Calculator?
You need your own target text and ideally one or two competitor pages. The tool has three boxes. With only your target pasted, every IDF equals 1, so the score is just term frequency.
What does a high TF-IDF score mean in the results?
A high score means the word appears often in your text and in few of the other pages you pasted. The top five ranks are highlighted. Those are your most distinctive terms compared with the references.
Why are some words missing from my TF-IDF results?
Words under four letters, common filler words and characters outside a to z are skipped, so terms like SEO or accented words may not appear. Plural forms also count separately. Only the top 30 scoring words are shown.
Is the TF-IDF Calculator free, and does it improve rankings?
Yes, it is free and needs no sign-in. It does not give a ranking score, but it shows which terms your content emphasizes versus competitors, helping you find topic gaps and edit copy naturally.
Recommended

Explore VPN options

A VPN changes your network exit. It does not guarantee anonymity.

Hide Your IP Encryption Network coverage
Protect My IP Now