كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(42)
Chapter: The virtue of prayer in congregation, and clarifying the stern warning against staying away from it, and that it is fard kifayah
(42)
باب فَضْلِ صَلاَةِ الجَمَاعَةِ وَبَيَانِ التَّشْدِيدِ فِي التَّخَلُّفِ عَنْهَا ‏
Sahih Muslim 650 a

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 650a
In-book reference : Book 5, Hadith 310
USC-MSA web (English) reference : Book 4, Hadith 1365
  (deprecated numbering scheme)