It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that he (peace and blessings be upon him) said: "Whoever performs ablution and does it well, then sets off and finds that the people have already prayed, Allah will give him a reward equal to that of those who prayed it and attended it, and nothing will be reduced from their reward."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5010
Sa'id bin al-Musayyib (may Allah have mercy on him) said: When death approached a man from the Ansar (may Allah be pleased with him), he said: I am going to narrate a hadith to you, and I narrate it to you only seeking reward from Allah. I heard the Messenger of Allah (peace and blessings be upon him) say: "When one of you performs ablution and does it well, then goes out to the prayer, he does not lift his right foot except that Allah Almighty records a good deed for him, and he does not put down his left foot except that a sin is removed from him, whether he takes short steps or long. If he comes to the mosque and prays in congregation, he is forgiven. If he comes to the mosque when part of the prayer has been prayed and part remains, and he prays what he catches and completes what remains, it is the same for him. And if he comes to the mosque when they have already prayed, and he completes the prayer, it is the same for him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5011