Most routing algorithms for sensor networks focus on finding energy efficient paths to prolong the lifetime of sensor networks. As a result, the power of sensors on efficient paths depletes quickly, and consequently sensor networks become incapable of monitoring events from some parts of their target areas. In many sensor network applications, the events that must be tracked occur at random locations and have non-deterministic generation patterns. Therefore, ideally, routing algorithms should consider not only energy efficiency, but also the amount of energy remaining in each sensor, thus avoiding non-functioning sensors due to early power depletion. This paper introduces a new metric, energy cost, devised to consider a balance of sensors' remaining energies, as well as energy efficiency. This metric gives rise to the design of the distributed energy adaptive routing (DEAR) algorithm devised to balance the data traffic of sensor networks in a decentralized manner and consequently prolong the lifetime of the networks. DEAR is scalable in the number of sensors and also robust to the variations in the dynamics of event generation. We demonstrate the effectiveness of the proposed algorithm by comparing three existing routing algorithms: direct communication approach, minimum transmission energy, and self-organized routing and find that energy balance should be considered to extend lifetime of sensor network and increase robustness of sensor network for diverse event generation patterns.