Sharing economy has become a socio-economic trend in the transportation and housing sectors. It develops business models leveraging underutilized resources. Like those sectors, power grid is also becoming smarter with many flexible resources, and researchers are investigating the impact of sharing resources here as well that can help to reduce cost and extract value. In this work, we investigate sharing of energy storage devices among individual households in a cooperative fashion. Coalitional game theory is used to model the scenario where the utility company imposes time-of-use (ToU) price and net metering (NM) billing mechanism. The resulting game has a non-empty core and we can develop a cost allocation mechanism with easy to compute analytical formula. Allocation is fair and cost-effective for every household. We design the price for the peer-to-peer (P2P) network and an algorithm for sharing that keeps the grand coalition always stable. Thus sharing electricity of storage devices among consumers can be effective in this set-up. Our mechanism is implemented in a community of 80 households in Texas using real data of load demand and solar irradiance and the results show significant cost savings for our method.