منهم من يمكث فيها شهراً ثم يخرج منها، ومنهم من يمكث فيها سنة ثم يخرج منها
Some will stay for one month and then released from it, and some will stay for one year and then released from it
أطولهم فيها مكثاً بقدر الدنيا منذ يوم خلقت إلى أن تفنى
The longest stay of disobedient Muslims in the fire will be less than infinity and the equivalent of the time span between creation and annihilation of universe which is more than 13.8 billion years.
Tafsir Ibn Kathir
Surah Al-Hijr
Ayah 2 ( Quran 15:2)