We find in many Quranic verses the mention of number forty:
and Al-Ahqaaf 15.
We also find in many Hadeeths the mention of the number forty.Forty years in Quran is the peak of the development of the human being (Al-Ahqaaf 15).
Forty years was the period of the punishment of Bani Isreal (Al-Ma'edah 26).
Forty nights was the period of the absence of Musa from his community to test them.
Forty days is the period after the martyrdom of Imam Husain (AS) when his son Imam Sajjad (AS) and his family returned back to visit him in Karbala. That is the time of Ziyarat al-Arba'een attended by millions every year.
It means that this number has important indication for reaching to maturity or completing the aim which Allah (SWT) wants. Details of the secrets of this number is best known to Allah (SWT) and His messenger and Ahlul Bayt (AS).