Dr. Mustafa Khattab, the Clear Quran - Surah Al-Kahf, ayah 12

Translation of Surah Al-Kahf, ayah 12 (18:12)

ثُمَّ بَعَثۡنَٰهُمۡ لِنَعۡلَمَ أَيُّ ٱلۡحِزۡبَيۡنِ أَحۡصَىٰ لِمَا لَبِثُوٓاْ أَمَدٗا ١٢
then We raised them so We may show which of the two groups would make a better estimation of the length of their stay.1 

Foot notes

222084

The People of the Cave themselves disagreed on how long they had slept in the cave. See 18:19.