WorkspaceTF-IDF
Analysis tools

FREE TEXT ANALYSIS TOOL · EN / UKR / RU / ES

TF-IDF Calculator

Calculate inverse-document-frequency weights across 2–10 documents. Use one shared corpus to reduce the influence of common terms and inspect what distinguishes each source.

Text-only corpora stay in-browser; a corpus containing a URL uses the stateless API for all sources.
01

Source corpus

2 of 10 documents
01

Document A

02

Document B

Shared “analysis” language gets less weight than terms unique to editing, search, or product feedback.

HOW TF-IDF WORKS

Calculate TF-IDF for a corpus of 2–10 documents

Add the texts you want to compare, or enter their public webpage URLs. Each document has a table with its raw count, term frequency (TF), document frequency, inverse document frequency (IDF), and final TF-IDF weight. The terms that stand out may differ between documents; change tabs to see which score highest in each.

TF divides a term’s count by the analyzed word count of its document. For document frequency, what matters is how many documents contain that term, rather than how many times they use it. The calculator multiplies TF by IDF, using the natural logarithm in the smoothed IDF formula below.

TFterm frequency ÷ analyzed words
IDFlog((N + 1) ÷ (df + 1)) + 1

WORKED EXAMPLE

Why a common word can still rank first

For this example, choose English and enter three documents: A is “coffee coffee tea”, B is “coffee milk”, and C is “coffee water”. The default stop-word list leaves all these words in place. Coffee is in every document and has IDF 1. Tea is found only in A, with IDF approximately 1.693.

Document A gives coffee TF 2/3 and TF-IDF about 0.667; tea has TF 1/3 and TF-IDF about 0.564. Coffee comes out ahead despite tea’s larger rarity multiplier, because coffee occurs twice. A term does not disappear just because every document contains it: this smoothed formula leaves it with an IDF weight of 1.

CORPUS SETUP

Choose documents that make the comparison useful

IDF is relative to the documents you add here. There is no web-wide reference collection, and changing the sources changes their weights. For editorial comparisons, use pages with a similar purpose and select comparable passages. Put a short product description beside an entire site’s navigation, and the scores become harder to interpret.

Shared preprocessing

Choose the language and stop-word options for your run. The calculator lowercases words, excludes standalone numbers, and removes stop words by default. Keeping or editing the stop words affects the vocabulary as well as the TF denominator for each document. Different word forms stay as they are; there is no stemming.

Top terms

Choose 1–100 to set how many rows each document returns, starting with the highest TF-IDF weights. By this point, IDF has already been calculated across the corpus. A lower limit gives you shorter returned vectors; it does not recalculate IDF using only the terms left in those vectors.

Global IDF table

If a result surprises you, check its document frequency. A term has high IDF when it occurs in fewer of the sources you supplied. A high IDF does not establish expertise, accuracy, search demand, or how many times the term ought to appear.

Input privacy

With pasted text alone, the calculation runs in your browser. Add even one URL and the corpus request goes to the server for analysis, along with any pasted documents included in that run.

READ AND EXPORT

Keep the corpus alongside its scores

CSV gives you the returned rows for the active document, with your text filter applied. JSON contains the returned document vectors and the shared result metadata. The selected top-term limit applies to both exports. Before treating the global IDF table as complete, check for partial-result notices.

A term’s score belongs to the corpus and preprocessing that produced it. For unweighted counts from a single document, use the Bag of Words Generator; the TF-IDF formula guide explains the calculation in more detail. Matching a competitor’s scores alone does not establish content quality or predict search rankings.