It is narrated from Hazrat Abu Saeed (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: Whoever offers the funeral prayer and accompanies (the funeral) up to the grave will receive the reward of two qirats, and whoever only offers the funeral prayer but does not go up to the grave will receive the reward of one qirat, and one qirat is equal to (the mountain of) Uhud.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 11218
Hadith Gradingحکم دارالسلام:حديث صحيح، وهذا إسناد حسن، خ: 1593