The Book of Mosques and Places of Prayer
5/42. Chapter:
The virtue of prayer in congregation, and clarifying the stern warning against staying away from it, and that it is fard kifayah
Sahih Muslim
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " صَلاَةُ الْجَمَاعَةِ أَفْضَلُ مِنْ صَلاَةِ الْفَذِّ بِسَبْعٍ وَعِشْرِينَ دَرَجَةً " .
Ibn Umar reported Allah's Messenger (ﷺ) assaying: Prayer said in a congregation is twenty-seven degrees more excellent than prayer said by a single person.
Reference : Sahih Muslim 650aIn-book reference : Book 5, Hadith 310USC-MSA web (English) reference : Book 4, Hadith 1365