Collaborative learning has been widely used in both offline and online contexts to support deep learning, and its effectiveness may be adjusted by the size of the collaborative groups. To examine the effect of learning context and group size on collaborative learning, this study conducted two experiments with 62 third-year undergraduate students enrolled in the course namedApplication of Modern Educational Technologyto compare learning outcomes, learning engagement, and collaborative experience between quad (four-person) and dyad groups in both face-to-face and online learning contexts. The results indicated that learning outcomes and collaborative experience were not significantly affected by group size and learning context, but for peer interaction, the dyad group showed more communication and interaction during the learning process. In general, the dyad group showed higher and more stable scores in all aspects, as well as being able to adapt to changes in learning contexts. Based on the research results, three practical implications were proposed to promote the implementation of collaborative learning in teaching.