What to do if I am unsure how much I prayed?

In the name of Allah, the Gracious, the Merciful

At some point during prayer, our thoughts might wander off and we become distracted from what we are doing. Then, we are unsure how many cycles (raka’at) we have prayed. What to do in such a situation?

Usually, this occurs during the second half of a prayer containing four raka’at. In this case, we should make up the following raka’at based upon what we are sure we have already prayed. In other words, we should assume we prayed the least of what we are certain that we prayed.

Abu Sa’eed reported: The Messenger of Allah, peace and blessings be upon him, said:

إِذَا شَكَّ أَحَدُكُمْ فِي صَلَاتِهِ فَلَمْ يَدْرِ كَمْ صَلَّى ثَلَاثًا أَمْ أَرْبَعًا فَلْيَطْرَحْ الشَّكَّ وَلْيَبْنِ عَلَى مَا اسْتَيْقَنَ ثُمَّ يَسْجُدُ سَجْدَتَيْنِ قَبْلَ أَنْ يُسَلِّمَ فَإِنْ كَانَ صَلَّى خَمْسًا شَفَعْنَ لَهُ صَلَاتَهُ وَإِنْ كَانَ صَلَّى إِتْمَامًا لِأَرْبَعٍ كَانَتَا تَرْغِيمًا لِلشَّيْطَانِ

If one of you doubts his prayer and does not know how much he has prayed, whether three or four cycles (raka’at), then let him put aside his doubt and act upon what he is certain of; then, perform two prostrations before he offers salutations of peace. If he had (mistakenly) prayed five cycles, the prostrations will make his prayer even. If he had prayed precisely four cycles, it will be humiliation for Satan.

Source: Ṣaḥīḥ Muslim 571, Grade: Sahih

An-Nawawi said:

وَقَالَ مَالِكٌ وَالشَّافِعِيُّ وَأَحْمَدُ رَضِيَ اللَّهُ عَنْهُمْ وَالْجُمْهُورُ مَتَى شَكَّ فِي صَلَاتِهِ هَلْ صَلَّى ثَلَاثًا أَمْ أَرْبَعًا مَثَلًا لَزِمَهُ الْبِنَاءُ عَلَى الْيَقِينِ فَيَجِبُ أَنْ يَأْتِيَ بِرَابِعَةٍ وَيَسْجُدَ لِلسَّهْوِ

Malik, Ash-Shafi’ee, and Ahmad, may Allah be pleased with them, as well as the majority said that when one has doubt in his prayer, whether he prayed three or four raka’at, one is required to act based upon what is known with certainty. Then, one completes the fourth raka’at and performs the prostrations of forgetfulness.

Source: Sharḥ al-Nawawī ‘alá Ṣaḥīḥ Muslim 389

This solution is based upon the Fiqh (Islamic jurisprudence) principle as stated by As-Suyuti:

الْيَقِين لَا يُزَال بِالشَّكِّ

Certainty is not removed by doubt.

Source: al-Ashbāh wal-Naẓāʼir 1/7

For example, if you are certain that you prayed at least two raka’at and you are unsure if you are in your third or fourth cycle, then certainty takes precedence and you should assume you are in the third cycle. Afterwards, you should perform two prostrations of forgetfulness (sujud al-sahwa) before ending the pray with the salutation of peace (al-taslim).

The two prostrations of forgetfulness are the general way of making up for some deficiency or minor mistake in the prayer. It should be done before a worshiper stands from his or her sitting position.

Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said:

إِنَّ أَحَدَكُمْ إِذَا قَامَ يُصَلِّي جَاءَ الشَّيْطَانُ فَلَبَسَ عَلَيْهِ حَتَّى لَا يَدْرِيَ كَمْ صَلَّى فَإِذَا وَجَدَ ذَلِكَ أَحَدُكُمْ فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ جَالِسٌ

Verily, if one of you stands for prayer, Satan comes to distract him until he does not know how many cycles he has performed. When that happens to one of you, then let him perform two prostrations while he is sitting.

Source: Ṣaḥīḥ al-Bukhārī 1175, Grade: Muttafaqun Alayhi

Even the Prophet (ṣ) became distracted or made minor mistakes in the prayer, so he would make up for it with the prostrations of forgetfulness.

Abdullah ibn Mas’ud reported: The Messenger of Allah, peace and blessings be upon him, prayed with us five raka’at. We said, “O Messenger of Allah, you added something to the prayer.” The Prophet said, “What is that?” They said, “You have prayed five raka’at.” The Prophet said:

إِنَّمَا أَنَا بَشَرٌ مِثْلُكُمْ أَذْكُرُ كَمَا تَذْكُرُونَ وَأَنْسَى كَمَا تَنْسَوْنَ

Verily, I am only a human being like you. I remember as you remember and I forget as you forget.

Source: Ṣaḥīḥ al-Bukhārī 6294, Grade: Muttafaqun Alayhi

Thereafter, the Prophet (ṣ) performed two prostrations for forgetfulness.

If the Prophet (ṣ) became distracted at times, then how much more likely are we to become distracted?

Hence, it is important to know this method of correcting the prayer when we make inevitable mistakes in it. If the mistake was caught before the end of the prayer, then the prostrations can be performed before prayer ends with the final salutation of peace. If the mistake was caught after the prayer, but before standing and leaving prayer, then it can be done before standing and the final salutations of peace are given again.

However, if a major mistake is made, such as completely forgetting one of the prayer’s integral parts (i.e. forgetting to recite Surat al-Fatihah), then the prayer should be repeated.

We ask Allah to grant us mindfulness, serenity, and reverence in prayer, and to forgive our mistakes and to guide us to best ways of expiation.

Success comes from Allah, and Allah knows best.