With smart grid, the power supply will shift from the 1: N tree structure with centralized power plants to the M:N structure with various kinds of distributed energy resources based on renewable energy, batteries, and so on. Deregulation of the electricity market will yield a truly competitive market, where anyone can become a power seller or buyer, which will necessitate a real-time multiseller-multibuyer power trading system. However, it is difficult to realize such a system without centralized control, because of the additional trade complexity created by a large number of sellers, including ordinary homes. In this paper, the authors propose a novel distributed power cooperation algorithm that maximizes each home's welfare based on local information. The proposed algorithm enables each home to calculate the same electricity market price from only local household information, to trade, and to maximize all members' satisfaction in smart grid by balancing consumption against supply. The authors formulate a distributed optimization problem and logically prove that the authors' algorithm can obtain the same optimal user welfare as the global optimal approach but within a much shorter time. (C) 2016 American Society of Civil Engineers.