The IF is calculated by dividing the number of citations in a given year to articles published in the previous two years by the total number of articles published in those two years. For example, if a journal has an IF of 5, it means that on average, each article published in the previous two years received 5 citations in the current year.