Impact Factor is only calculated for journals indexed in the Science Citation Index (SCI) and Social Science Citation Index (SSCI) in Web of Science (by Clarivate Analytics). If we are calculating the Impact Factor of journal X in 2017, the value would be:
A: total citations received by journal X in 2017 for articles journal X published in 2015 and 2016 - divided by - B: total number of articles published by journal X in 2015 and 2016.
But the only citations that count are those received by journals indexed in the SCI or SSCI.
The journal will only have Impact Fator if it's indexed in SCI or SSCI and they only calculate the impact factor once a year, in June, so if a journal just got accepted, the IF will only be calculated in the next edition (2019).