Abu Hurairah (May Allah be pleased with him) reported:
The Messenger of Allah (ﷺ) said, "Whoever follows the funeral procession and offers the funeral prayer for it, will get a reward equal to one Qirat, and whoever attends it till burial, will get a reward equal to two Qirat.'' It was asked, "What are two Qirat?'' He (ﷺ) replied, "Equal to two huge mountains."[Al-Bukhari and Muslim].
App reference: Book 7, Hadith 36
Arabic/English book reference: Book 7, Hadith 929