This paper employs a novel approach which is based on genetic algorithm (GA) and social network analysis to grouping partners for cooperative learning in the classroom. A social network analysis tool, i.e., sociometry, is used to measure social status of students. Subsequently, GA is used to optimize the grouping subject to the constraints of heterogeneous grades, social status, and gender in different levels. The results from GA are illustrated in the sociogram generated by a sociometry tool. Results show that the proposed approach can optimize the grouping well.