Energy sharing among energy harvesting base sta-tions (BSs) has the potential to improve the utilization of the harvested renewable energy. However, not much work has been done to optimize the power sharing among BSs while considering the topology of the cellular network and the distance-dependent power loss (DDPL) in the transmission lines. In this paper, we propose two power sharing optimization algorithms: the min-cost-max-flow (MCMF) algorithm and the max-flow (MF) algorithm. The MCMF algorithm optimizes the power sharing considering the DDPL, and therefore shares the power over much shorter distances whereas the MF algorithm optimizes the power sharing without considering the DDPL. Our numerical results show that for cellular networks with moderate DDPL value, the MCMF saves up to 10%, 22%, and 30% more power than the MF algorithm for 5, 10, and 15 BSs uniformly distributed in a square of unit length where every pair of BSs can share power, respectively. In contrast, for cellular networks with very high or very low DDPL value, the performance difference between the two algorithms is negligible. In addition, the performance gain of MCMF over MF increases with the BS density.