The classic tf.idf formula assigns weight w i to term i in document D as: where tf i is the number of times term i occurs in D, idf i is the inverse document frequency of term i, N is the total number of documents and df i is the number of documents that contain term i.
the weight of term Table 2: SMART notation for inverse document frequency variants.