The student peer-group is one of the most important influences on student development. Group work is essential for creating positive learning experiences, especially in remote-learning where student interactions are more challenging. While the benefits of study groups are established, students from underrepresented communities often face challenges in finding social support for their education when compared with those from majority groups. We present a system for flexible and inclusive study group formation that can scale to thousands of students.Our focus is on long-term study groups that persist throughout the semester and beyond. Students are periodically provided opportunities to obtain a new study group if they feel their current group is not a good fit. In contrast to prior work that generates single-use groups, our process enables continuous refinement of groups for each student, which in turn informs our algorithm for future iterations.We trialed our approach in a 1000+ student introductory Electrical Engineering and Computer Science course that was conducted entirely online during the COVID-19 pandemic. We found that of all students matched to study groups through our algorithm, a large majority felt comfortable asking questions (78%) and sharing ideas (74%) with their group. Students from underrepresented backgrounds were more likely to request software-matching for study groups when compared with students from majority groups. However, underrepresented students that we did match into study groups had group experiences that were just as successful as students from' majority groups. Students in engaged, regularly participating study groups had more positive results across all other indicators of the study group experience, and certain positive group experiences were associated with higher exam scores overall. Furthermore, students performing at a B-level on the first class midterm, who participated in high-quality software-matched study groups, demonstrated higher final exam scores than students in lowerquality groups.