In the funeral prayer: for all of us
اللَّهُمَّ اغْفِرْ لِحَيِّنَا وَمَيِّتِنَا، وَشَاهِدِنَا وَغَائِبِنَا، وَصَغِيرِنَا وَكَبِيرِنَا، وَذَكَرِنَا وَأُنْثَانَا
اللَّهُمَّ مَنْ أَحْيَيْتَهُ مِنَّا فَأَحْيِهِ عَلَى الْإِسْلَامِ، وَمَنْ تَوَفَّيْتَهُ مِنَّا فَتَوَفَّهُ عَلَى الْإِيمَانِ، اللَّهُمَّ لَا تَحْرِمْنَا أَجْرَهُ، وَلَا تُضِلَّنَا بَعْدَهُ
Transliteration
Allahummaghfir li hayyina wa mayyitina, wa shahidina wa gha'ibina, wa saghirina wa kabirina, wa dhakarina wa unthana. Allahumma man ahyaytahu minna fa ahyihi 'alal-islam, wa man tawaffaytahu minna fa tawaffahu 'alal-iman. Allahumma la tahrimna ajrah, wa la tudillana ba'dah.
Meaning
O Allah, forgive our living and our dead, those present and those absent, our young and our old, our men and our women. O Allah, whomever of us You keep alive, keep him alive on Islam, and whomever of us You take, take him on faith. O Allah, do not deprive us of the reward for him, and do not let us go astray after him.
The story
Abu Hurayrah reported that when the Prophet ﷺ prayed over the dead, he said these words, praying for the living and the dead together.
When
In the janazah prayer, after the third takbir, with or after the dua for the deceased
Purpose and benefits
It includes every Muslim, living and dead, young and old.
It asks to live on Islam, die on faith and not be led astray after the loss.
Sources
- Sunan Abi Dawud 3201 Sahih (al-Albani)
Abu Hurayrah: his dua in the funeral prayer. - Sunan Ibn Majah 1498 Sahih (al-Albani)
The same narration.