كتاب الجنائز
11  
The Book of Prayer - Funerals
(17)
Chapter: The virtue of offering the funeral prayer and following the bier
(17)
باب فَضْلِ الصَّلاَةِ عَلَى الْجَنَازَةِ وَاتِّبَاعِهَا ‏
Sahih Muslim 946 a

Thauban, the freed slave of the Messenger of Allah (ﷺ) reported Allah's Messenger (ﷺ) as saying:

He who offered prayer for the dead, for him is the reward of one qirat, and he who attended its burial, he would have two qirats as his reward. And qirat is equivalent to Uhud.
وَحَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا يَحْيَى، - يَعْنِي ابْنَ سَعِيدٍ - حَدَّثَنَا شُعْبَةُ، حَدَّثَنِي قَتَادَةُ، عَنْ سَالِمِ بْنِ أَبِي الْجَعْدِ، عَنْ مَعْدَانَ بْنِ أَبِي طَلْحَةَ الْيَعْمَرِيِّ، عَنْ ثَوْبَانَ، مَوْلَى رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ مَنْ صَلَّى عَلَى جَنَازَةٍ فَلَهُ قِيرَاطٌ فَإِنْ شَهِدَ دَفْنَهَا فَلَهُ قِيرَاطَانِ الْقِيرَاطُ مِثْلُ أُحُدٍ ‏"‏ ‏.‏
Reference : Sahih Muslim 946a
In-book reference : Book 11, Hadith 74
USC-MSA web (English) reference : Book 4, Hadith 2069
  (deprecated numbering scheme)