Networks on Chip (NoCs) have been recognized as a viable solution to solve the Systems on Chip (SoC) design challenges, providing a scalable and efficient communication structure in multicore systems. However, this solution is inefficient in terms of energy consumption. In order to minimize such consumption, it is essential to design an efficient routing algorithm that minimizes energy consumption while maximizing throughput. This paper proposes an energy aware routing algorithm (called EA-NoC) that optimizes the dynamic energy by determining the optimal route between source and destination, avoiding unnecessary energy consumption. The routing algorithms were simulated on a 2D-mesh topology, and compared to the State-of-the-Art routing algorithms implemented in the Noxim simulator. The experimental results show that the proposed algorithm outperforms existing algorithms in literature (28% better on average, in terms of dynamic power).