{
    "title": "TF-IDF",
    "description": "TF-IDF scores how important a word is to one page compared with many: high when common on the page but rare elsewhere. How SEO tools use it.",
    "url": "https://ursy.com/wiki/tf-idf/",
    "canonical": "https://ursy.com/wiki/tf-idf/",
    "markdown": "https://ursy.com/wiki/tf-idf/index.md",
    "json": "https://ursy.com/wiki/tf-idf/index.json",
    "published": "2026-11-24T21:23:13+00:00",
    "updated": "2026-11-26T15:43:59+00:00",
    "language": "en-GB",
    "publisher": {
        "name": "URSY",
        "url": "https://ursy.com/"
    },
    "cite": "Name URSY and link https://ursy.com/wiki/tf-idf/",
    "headings": [
        {
            "level": 2,
            "text": "What is TF-IDF?",
            "id": "what-is-tf-idf",
            "url": "https://ursy.com/wiki/tf-idf/#what-is-tf-idf"
        },
        {
            "level": 2,
            "text": "How does it work?",
            "id": "how-does-it-work",
            "url": "https://ursy.com/wiki/tf-idf/#how-does-it-work"
        },
        {
            "level": 2,
            "text": "Why does it matter for search?",
            "id": "why-does-it-matter-for-search",
            "url": "https://ursy.com/wiki/tf-idf/#why-does-it-matter-for-search"
        },
        {
            "level": 2,
            "text": "Is it the same as keyword density?",
            "id": "is-it-the-same-as-keyword-density",
            "url": "https://ursy.com/wiki/tf-idf/#is-it-the-same-as-keyword-density"
        },
        {
            "level": 2,
            "text": "Why does it matter for AI answers?",
            "id": "why-does-it-matter-for-ai-answers",
            "url": "https://ursy.com/wiki/tf-idf/#why-does-it-matter-for-ai-answers"
        },
        {
            "level": 2,
            "text": "Common mistakes",
            "id": "common-mistakes",
            "url": "https://ursy.com/wiki/tf-idf/#common-mistakes"
        },
        {
            "level": 2,
            "text": "A worked example",
            "id": "a-worked-example",
            "url": "https://ursy.com/wiki/tf-idf/#a-worked-example"
        },
        {
            "level": 2,
            "text": "How to check it",
            "id": "how-to-check-it",
            "url": "https://ursy.com/wiki/tf-idf/#how-to-check-it"
        },
        {
            "level": 2,
            "text": "Questions",
            "id": "questions",
            "url": "https://ursy.com/wiki/tf-idf/#questions"
        },
        {
            "level": 3,
            "text": "Does Google use TF-IDF?",
            "id": "does-google-use-tf-idf",
            "url": "https://ursy.com/wiki/tf-idf/#does-google-use-tf-idf"
        },
        {
            "level": 3,
            "text": "Is a TF-IDF tool worth using?",
            "id": "is-a-tf-idf-tool-worth-using",
            "url": "https://ursy.com/wiki/tf-idf/#is-a-tf-idf-tool-worth-using"
        },
        {
            "level": 3,
            "text": "What is a good TF-IDF score?",
            "id": "what-is-a-good-tf-idf-score",
            "url": "https://ursy.com/wiki/tf-idf/#what-is-a-good-tf-idf-score"
        },
        {
            "level": 2,
            "text": "Related words",
            "id": "related-words",
            "url": "https://ursy.com/wiki/tf-idf/#related-words"
        },
        {
            "level": 2,
            "text": "Sources",
            "id": "sources",
            "url": "https://ursy.com/wiki/tf-idf/#sources"
        }
    ],
    "links": [
        {
            "text": "information retrieval",
            "url": "https://ursy.com/wiki/information-retrieval/",
            "internal": true
        },
        {
            "text": "SEO",
            "url": "https://ursy.com/wiki/seo-search-engine-optimisation/",
            "internal": true
        },
        {
            "text": "Wikipedia article on tf-idf",
            "url": "https://en.wikipedia.org/wiki/Tf%E2%80%93idf",
            "internal": false
        },
        {
            "text": "tf-idf term weighting",
            "url": "https://scikit-learn.org/stable/modules/feature_extraction.html",
            "internal": false
        },
        {
            "text": "search engines",
            "url": "https://ursy.com/wiki/search-engine/",
            "internal": true
        },
        {
            "text": "search index",
            "url": "https://ursy.com/wiki/search-engine-index/",
            "internal": true
        },
        {
            "text": "Google",
            "url": "https://ursy.com/wiki/google/",
            "internal": true
        },
        {
            "text": "How Search works",
            "url": "https://www.google.com/search/howsearchworks/how-search-works/ranking-results/",
            "internal": false
        },
        {
            "text": "keywords",
            "url": "https://ursy.com/wiki/keyword/",
            "internal": true
        },
        {
            "text": "ranking factor",
            "url": "https://ursy.com/wiki/ranking-factor/",
            "internal": true
        },
        {
            "text": "content gap analysis",
            "url": "https://ursy.com/wiki/content-gap-analysis/",
            "internal": true
        },
        {
            "text": "content optimisation",
            "url": "https://ursy.com/wiki/content-optimisation/",
            "internal": true
        },
        {
            "text": "Keyword density",
            "url": "https://ursy.com/wiki/keyword-density/",
            "internal": true
        },
        {
            "text": "spam policies",
            "url": "https://developers.google.com/search/docs/essentials/spam-policies",
            "internal": false
        },
        {
            "text": "keyword stuffing",
            "url": "https://ursy.com/wiki/keyword-stuffing/",
            "internal": true
        },
        {
            "text": "SEO Starter Guide",
            "url": "https://developers.google.com/search/docs/fundamentals/seo-starter-guide",
            "internal": false
        },
        {
            "text": "AI search",
            "url": "https://ursy.com/wiki/ai-search/",
            "internal": true
        },
        {
            "text": "embeddings",
            "url": "https://ursy.com/wiki/embeddings/",
            "internal": true
        },
        {
            "text": "vector search",
            "url": "https://ursy.com/wiki/vector-search/",
            "internal": true
        },
        {
            "text": "retrieval-augmented generation",
            "url": "https://ursy.com/wiki/retrieval-augmented-generation/",
            "internal": true
        },
        {
            "text": "entity",
            "url": "https://ursy.com/wiki/entity/",
            "internal": true
        },
        {
            "text": "semantic search",
            "url": "https://ursy.com/wiki/semantic-search/",
            "internal": true
        },
        {
            "text": "helpful content",
            "url": "https://ursy.com/wiki/helpful-content/",
            "internal": true
        },
        {
            "text": "search intent",
            "url": "https://ursy.com/wiki/search-intent/",
            "internal": true
        },
        {
            "text": "Heading Answer Gap Finder",
            "url": "https://ursy.com/webmaster-tools/heading-answer-gap-finder/",
            "internal": true
        },
        {
            "text": "Question Coverage Mapper",
            "url": "https://ursy.com/webmaster-tools/question-coverage-mapper/",
            "internal": true
        },
        {
            "text": "Word Counter",
            "url": "https://ursy.com/webmaster-tools/word-counter/",
            "internal": true
        },
        {
            "text": "Duplicate Content Comparer",
            "url": "https://ursy.com/webmaster-tools/duplicate-content-comparer/",
            "internal": true
        },
        {
            "text": "Compare Two Websites",
            "url": "https://ursy.com/compare-websites/",
            "internal": true
        },
        {
            "text": "Readability Checker",
            "url": "https://ursy.com/readability-checker/",
            "internal": true
        },
        {
            "text": "Meta Tag Checker",
            "url": "https://ursy.com/meta-tag-checker/",
            "internal": true
        },
        {
            "text": "Content brief builder",
            "url": "https://ursy.com/pro/content-brief-builder/",
            "internal": true
        },
        {
            "text": "Plain English editor",
            "url": "https://ursy.com/pro/plain-english-editor/",
            "internal": true
        },
        {
            "text": "hit",
            "url": "https://ursy.com/wiki/hit-analytics/",
            "internal": true
        },
        {
            "text": "Natural language processing",
            "url": "https://ursy.com/wiki/natural-language-processing/",
            "internal": true
        },
        {
            "text": "On-page SEO",
            "url": "https://ursy.com/wiki/on-page-seo/",
            "internal": true
        }
    ],
    "words": 1112,
    "text": "TF-IDF (term frequency times inverse document frequency) is a score that shows how important a word is to one document compared with a whole set of documents: high when the word is common on that page but rare elsewhere. It is one of the oldest ideas in information retrieval. In SEO it turns up in content tools that compare your page with pages that already rank. What is TF-IDF? It joins 2 counts: Term frequency (TF): how often the word appears in this document. Inverse document frequency (IDF): how rare the word is across the whole collection. A word found in every document gets an IDF near 0. A word found in very few gets a high IDF. Multiply them and you get TF-IDF. Everyday words such as “the” or “and” score near 0 everywhere, because they are in every document. A word like “limescale” scores high on a descaling guide and 0 on a page about shoes. The idea of IDF is credited to the computer scientist Karen Spärck Jones, who described it as “term specificity” in a 1972 paper, as the Wikipedia article on tf-idf records. How does it work? The textbook form uses N for the number of documents and df for how many of them contain the word: idf = log(N / df) tf-idf = tf x idf Real software adds small changes. The scikit-learn library, widely used in Python, documents its tf-idf term weighting clearly. By default it uses: idf(t) = log((1 + n) / (1 + df(t))) + 1 Its documentation says the extra 1s act as if one extra document held every word once, which prevents division by zero. It then scales each document’s scores to the same length (L2 normalisation), so long pages do not win just by being long. It also explains the point of the whole method: words like “the”, “a” and “is” are very common but carry little meaning, and raw counts would let them drown out rarer, more useful words. Why does it matter for search? TF-IDF was a building block of early search engines. It helped rank documents in a search index by how well they matched the words in a query. Modern engines use far more than that. Google’s How Search works page says matching keywords is the most basic relevance signal, then describes language models, a synonym system and checks for other relevant content beyond the keyword itself. It says a page that repeats a word too much is not what people want. So TF-IDF is best seen as a writing aid, not a ranking factor. SEO tools use it to compare your page with the top results for a query and list words those pages use that yours does not. That can reveal real gaps, such as a guide to kettles that never mentions “limescale”. It can also push writers to sprinkle in words for no reason. See content gap analysis and content optimisation. Is it the same as keyword density? No. Keyword density is just one word’s share of a page’s words. It ignores the rest of the web. TF-IDF weighs each word by how rare it is across a collection, so it can tell a meaningful word from filler. Both share the same risk: chasing a number. Google’s spam policies list repeating words or phrases so often that it sounds unnatural as keyword stuffing. Its SEO Starter Guide adds that repetition “even in variations” is tiring for users. Why does it matter for AI answers? Most AI search tools find passages with embeddings and vector search, which compare meaning. Some retrieval systems still blend in word-matching scores from the TF-IDF family, because exact terms such as model numbers, product codes and place names matter. The practical lesson for retrieval-augmented generation is the same either way: use the exact names of your products (each entity) and the exact words your customers use, once each where they fit. A page that says “our model” instead of the real model name is hard to match by words and by meaning. See semantic search. Common mistakes Treating the tool’s list as a quota. Adding a word 6 times because a rival used it 6 times. Copying the top 10. If every page says the same thing, matching them makes yours the 11th copy. Original detail beats it. See helpful content. Tiny or odd samples. IDF from 10 pages is noisy. Forums and shops in the same results skew the numbers. Ignoring intent. A word may be common on ranking pages because they serve a different search intent from yours. Forgetting the reader. The score cannot tell you if the page answers the question. A worked example Take a collection of 1,000 pages and a 500-word guide to descaling a kettle. Using log base 10 for easy numbers: Word Times on the guide (tf) Pages containing it (df) idf = log(1,000 / df) tf-idf the 30 1,000 0 0 kettle 8 10 2 16 limescale 3 2 2.7 8.1 water 6 200 0.7 4.2 “The” appears 30 times but scores 0: it says nothing about the topic. “Limescale” appears only 3 times but scores highly because it is rare. Real tools use different formulas, as scikit-learn shows, so their numbers will differ, but the order of words is what matters. How to check it Read your page next to the top results for the query. Note subjects they cover and you do not, not just words. Check the topics your headings cover with the free Heading Answer Gap Finder and the Question Coverage Mapper. Count words with the Word Counter if you want to see repetition plainly. Compare two of your own pages for overlap with the Duplicate Content Comparer, or a rival’s page with Compare Two Websites. Make sure the finished page reads well with our Readability Checker, and that its title and description say what it is with the Meta Tag Checker. In URSY Pro, the Content brief builder plans a page from real questions, and the Plain English editor keeps it readable. Questions Does Google use TF-IDF? Google does not publish its formulas. It says it uses keyword matching as a basic signal, plus language models and synonyms. Do not write for one formula. Is a TF-IDF tool worth using? As a checklist of subjects you may have missed, yes. As a target to hit, no. What is a good TF-IDF score? There is none. Scores only mean something compared with other words and pages in the same collection. Related words Keyword density Keyword stuffing Natural language processing On-page SEO Content optimisation Sources scikit-learn: Feature extraction, tf-idf term weighting, checked 24 November 2026 Wikipedia: tf-idf, checked 24 November 2026 Google: How Search works, ranking results, checked 24 November 2026 Google Search Central: Spam policies for Google web search, checked 24 November 2026 Google Search Central: SEO Starter Guide, checked 24 November 2026 Updated 24 November 2026 by URSY.com.",
    "source": "https://ursy.com/wiki/tf-idf/"
}