This paper analyzes the effects of middle school ability grouping on cognitive achievement in mathematics and science. In contrast to most previous research on tracking, this analysis compares outcomes in grouped and nongrouped schools. The hypotheses tested here are, first, that ability grouping raises the aggregate level of student achievement and, second, that ability grouping achieves this end by increasing the learning of all students. Comparing average student achievement growth from the seventh to the ninth grades in grouped and nongrouped schools shows that overall gains from ability grouping in either subject are negligible, controlling for differences in student social background and initial levels of achievement. Comparing the achievement growth of nongrouped students and high- and low-group students shows that high-group placement generally has a weak positive effect while low-group placement has a stronger negative effect. Ability grouping thus appears to benefit advanced students, to harm slower students, and to have a negligible overall effect as the benefits and liabilities cancel each other out.