What is the minimum number of years that a sinful Muslim has to stay in hell?
All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
The sinful Muslims will be under the Will of Allah on the Day of Judgement; Allah may punish them if He so wishes and He may forgive them if He so wishes. For more benefit, please refer to fatwa 89494.
Those believers who enter Hellfire will be punished according to their sins, and then they will come out of it because of their faith, as evidenced by Islamic texts.
Ibn Al-Qayyim said, “None of the sinful Muslims will remain [eternally] in Hellfire; once they are punished according to the punishment which they deserve, they will be taken out of Hellfire and admitted into Paradise.”
As far as we know, there is no mention in the Quran and Sunnah of the number of days or months or years that they will remain in Hellfire. But it is enough as a deterrence for a Muslim to know that entering Hellfire, even if it were for a little while, is a disgrace and torture; we seek refuge in Allah from this. Allah says (what means): {Our Lord, indeed whoever You admit to the Fire - You have disgraced him...} [Quran 3:192] This includes those who will enter it and then will come out of it of the sinful believers.
Ibn Jareer after having stated two views of the scholars, one of which is that it is about those who will eternally abide in Hell, and the second view is of Jaabir ibn Abdullah, said about the interpretation of this verse that the verse is general, for both those who will enter it eternally and those who will [enter it and then] come out of it. Ibn Jareer said, “The opinion that is closer to the truth of the two, in my own opinion, is that of Jaabir: that whoever enters Hellfire is disgraced by entering it even if he comes out of it afterwards. This is because disgrace means exposing and divulging the sins of the disgraced person, and whoever is punished by his Lord in the Hereafter for his sins, then his Lord has exposed his sins by punishing him, and that is the disgrace.”
Allah knows best.
You can search for fatwa through many choices