Bulugh al-Maram, Book 3, Hadith 26 (In-Book)

Ibn ‘Abbas (RAA) narrated, ‘I heard the Messenger of Allah say, "If a Muslim man dies and a group of forty people, who do not associate any one with Allah, pray for him, Allah will accept their intercession for him (by way of their Du’A for him.” Related by Muslim.

وَعَنِ ابْنِ عَبَّاسٍ رَضِيَ اَللَّهُ عَنْهُمَا: سَمِعْتُ اَلنَّبِيَّ ‏- صلى الله عليه وسلم ‏-يَقُولُ: { مَا مِنْ رَجُلٍ مُسْلِمٍ يَمُوتُ, فَيَقُومُ عَلَى جَنَازَتِهِ أَرْبَعُونَ رَجُلًا, لَا يُشْرِكُونَ بِاَللَّهِ شَيْئًا, إِلَّا شَفَّعَهُمْ اَللَّهُ فِيهِ } رَوَاهُ مُسْلِمٌ 1‏.‏ ‏1 ‏- حسن.‏ رواه مسلم (948)‏.‏

sunnah.com

also referenced under: Book 3, Hadith 582 (English)