The Prophet ﷺ said, "Allah has chosen four phrases from all speech, Subhan Allah, Alhamdulillah, La ilaha illa Allah, and Allahu Akbar. Whoever says Subhan Allah, twenty good deeds are recorded for him and twenty sins are wiped away. Whoever says Allahu Akbar, the same is recorded for him. Whoever says La ilaha illa Allah, the same is recorded for him. And whoever says Alhamdulillahi Rabbil Alamin from his own heart, thirty good deeds are recorded for him and thirty sins are wiped away."
عن النبي ﷺ قال: إن الله عز وجل اصطفى من الكلام أربعا: سبحان الله والحمد لله، ولا إله إلا الله، والله أكبر، قال: ومن قال: سبحان الله كتب له عشرون حسنة، وحط عنه عشرون سيئة، ومن قال: الله أكبر فمثل ذلك، ومن قال: لا إله إلا الله فمثل ذلك، ومن قال: الحمد لله رب العالمين من قبل نفسه، كتب له بها ثلاثون حسنة، وحط عنه بها ثلاثون سيئة.
Ahmad (8093, 8012), Nasai in Amal al-Yawm wal-Layla (840), and Hakim (1/512), who graded it sahih, all narrated it through the route of Israel, from Abu Sinan Darrar bin Mura, from Abu Salih Hanafi (who is Abdul-Rahman bin Qays), from Abu Saeed and Abu Hurairah, who both mentioned it.In the version recorded by Ahmad (8012), the wording is, "Allah records for him twenty good deeds or erases from him twenty bad deeds," expressed with uncertainty. Its chain is sahih.Hakim said, "This hadith is sahih according to the criterion of Muslim."