This paper estimates peer effects originating from the ability composition of tutorial groups for undergraduate students in economics. We manipulated the composition of groups to achieve a wide range of support, and assigned students — conditional on their prior ability — randomly to these groups. The data support a specification in which the impact of group composition on achievement is captured by the mean and standard deviation of peers’ prior ability, their interaction, and interactions with students’ own prior ability. When we assess the aggregate implications of these peer effects regressions for group assignment, we find that low and medium ability students gain on average 0.19 SD units of achievement from switching from ability mixing to three-way tracking. Their dropout rate is reduced by 12 percentage points (relative to a mean of 0.6). High-ability students are unaffected. Analysis of survey data indicates that in tracked groups, low-ability students have more positive interactions with other students, and are more involved. We find no evidence that teachers adjust their teaching to the composition of groups.