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.
suyuti:16311a
Request/Fix translation

  

السيوطي:١٦٣١١a

"قَد يَتَوَجَّهُ الرَّجُلَانِ إِلَى المَسْجِدِ فَيَنْصَرِفُ أَحَدُهُمَا وَصَلَاتُه أَفْضَل مِنْ الآخَر إِذَا كَانَ أَفْضَلَهُمَا عَقْلًا، وَيَنْصَرِفُ الآخَر وَصَلَاتُه لَا تَعْدِلِ مِثْقَال ذَرةٍ".  

[طب] الطبرانى في الكبير وابن عساكر عن أبي أيوب

See similar narrations below:

Collected by Ṭabarānī
tabarani:3970Abū ʿAqīl Anas b. Salm al-Khawlānī > Muḥammad b. Rajāʾ al-Sakhtiyānī > Munabbih b. ʿUthmān > al-Zubaydī > al-Zuhrī > ʿAṭāʾ b. Yazīd > Abū Ayyūb al-Anṣārī

[Machine] The Prophet ﷺ said, "Two men may go to the mosque and one of them will finish his prayer better than the other if he is more excellent in his intellect. The other will finish his prayer and it will not be equal to the weight of a small atom."  

الطبراني:٣٩٧٠حَدَّثَنَا أَبُو عَقِيلٍ أَنَسُ بْنُ سَلْمٍ الْخَوْلَانِيُّ حَدَّثَنَا مُحَمَّدُ بْنُ رَجَاءٍ السَّخْتِيَانِيُّ ثنا مُنَبِّهُ بْنُ عُثْمَانَ ثنا الزُّبَيْدِيُّ عَنِ الزُّهْرِيِّ عَنْ عَطَاءِ بْنِ يَزِيدَ عَنْ أَبِي أَيُّوبَ الْأَنْصَارِيِّ قَالَ

قَالَ النَّبِيُّ ﷺ «قَدْ يَتَوَجَّهُ الرَّجُلَانِ إِلَى الْمَسْجِدِ وَيَنْصَرِفُ أَحَدُهُمَا وَصَلَاتُهُ أَفْضَلُ مِنَ الْآخَرِ إِذَا كَانَ أَفْضَلَهُمَا عَقْلًا وَيَنْصَرِفُ الْآخَرُ وَصَلَاتُهُ لَا تَعْدِلُ مِثْقَالَ ذَرَّةٍ»