TF-IDF
Calculate TF-IDF instantly with the exact formula and a worked example.
TF-IDF
Term occurrences in the document
Total words in the document
Documents in the corpus N
Documents containing the term DF
TF-IDF
0.129013
TF
0.4286
IDF (log₁₀)
0.301
TF-IDF with natural log
0.2971
More about: TF-IDF
What it calculates
The “TF-IDF” calculator computes TF-IDF from 4 parameters: term occurrences in the document, total words in the document, documents in the corpus n, documents containing the term df.
Standard IT calculations for developers and sysadmins.
Example calculation
With parameters Term occurrences in the document = 3, Total words in the document = 7, Documents in the corpus N = 2, Documents containing the term DF = 1 the result is 0.129 (If DF exceeds N, it is set equal to N).
How to use
- Enter term occurrences in the document, total words in the document, documents in the corpus n and documents containing the term df — each field above is adjustable with a slider.
- TF-IDF is calculated automatically as you type.
- Check the worked example below to see the formula applied to real numbers.
- Copy the result or bookmark this calculator.
Related calculators
FAQ
How is TF-IDF calculated?
The TF-IDF calculator computes TF-IDF from term occurrences in the document, total words in the document, documents in the corpus n, documents containing the term df. Enter your values above and the exact formula is applied instantly; a worked example with real numbers is shown below.
Is the TF-IDF calculator free?
Yes. It is completely free, needs no signup, runs entirely in your browser, and sends no data to any server.
More calculators in this category
Explore related free tools