Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ahmad:4076Muḥammad b. Fuḍayl > Khuṣayf > Abū ʿUbaydah b. ʿAbdullāh > ʿAbdullāh b. Masʿūd

[Machine] "If you doubt the number of rak'ahs you have performed in your prayer while sitting, and you are unsure whether you have prayed three or four rak'ahs, then if you are more inclined to believe that you have prayed three, then stand up, perform one rakah, then prostrate twice, then recite the final tashahhud, then conclude the prayer. But if you are more inclined to believe that you have prayed four, then conclude the prayer, then prostrate twice, then recite the final tashahhud, then conclude the prayer."  

أحمد:٤٠٧٦حَدَّثَنَا مُحَمَّدُ بْنُ فُضَيْلٍ حَدَّثَنَا خُصَيْفٌ حَدَّثَنِي أَبُو عُبَيْدَةَ بْنُ عَبْدِ اللهِ عَنْ عَبْدِ اللهِ بْنِ مَسْعُودٍ قَالَ

إِذَا شَكَكْتَ فِي صَلَاتِكَ وَأَنْتَ جَالِسٌ فَلَمْ تَدْرِ ثَلَاثًا صَلَّيْتَ أَمْ أَرْبَعًا فَإِنْ كَانَ أَكْبَرُ ظَنِّكَ أَنَّكَ صَلَّيْتَ ثَلَاثًا فَقُمْ فَارْكَعْ رَكْعَةً ثُمَّ سَلِّمْ ثُمَّ اسْجُدْ سَجْدَتَيْنِ ثُمَّ تَشَهَّدْ ثُمَّ سَلِّمْ وَإِنْ كَانَ أَكْبَرُ ظَنِّكَ أَنَّكَ صَلَّيْتَ أَرْبَعًا فَسَلِّمْ ثُمَّ اسْجُدْ سَجْدَتَيْنِ ثُمَّ تَشَهَّدْ ثُمَّ سَلِّمْ