In this paper, we propose a matching theory based multi-user cooperative computing (MUCC) scheme to minimize the overall energy consumption of a group of user equipments (UEs), where the UEs can be classified into the following roles: resource demander (RD), resource provider (RP), and standalone UE (SU). We first determine the role of each UE by leveraging the roommate matching method. Then, we propose the college admission based algorithm to divide the UEs into multiple cooperation groups, each consisting of one RP and multiple RDs. Next, we propose the rotation swap operation to further improve the performance without deteriorating the system stability. Finally, we present an effective task offloading algorithm to minimize the energy consumption of all the cooperation groups. The simulation results verify the effectiveness of the proposed scheme.