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.