ie. IDF = log (D/di),
where D is the total number of documents and di is the number of documents containing a given term, 'i' [counting each document only once, even if a keyword appears in it multiple times].
IDF was useful with early search engines and IR systems. But because large size search engines on the Web are too generic, it has been slowly phased out by models that incorporate relevance information and more stable as the size of the collection grows.
Regards,
Rajasekhar bayapu.