Students should learn to work in teams in undergraduate engineering courses. In many cases students form their own teams for group study and design projects. This paper describes a performance-based team formation method implemented in two upper-division mechanical engineering thermal science courses. The instructor formed teams based on early academic performance in the class. Students with the highest exam scores were assigned as team leaders, and other students were distributed among the teams based on their exam scores in order to balance the talent among the teams. The team members were required to complete a design project together and were also encouraged to study together on homework assignments. As an incentive, the team members received bonus points. The team formation process was based on student performance has the advantages of being easy to implement and explain to reluctant students. A follow -up survey shows that the majority of students liked the performance balanced team formation method while some suggested broadening the performance metric and inclusion of peer evaluations to assess individual student grades in the team design project.