The algorithm is developed for choosing the most appropriate route with the help of dynamic routing table. The research direction of network-on-chips (NoC) is essential. The aim is to control the congestion which would cause very serious consequences.After NoC's wide application in variety of systems, how to improve the speed of communication among chips, which means how to control congestions effectively, becomes a significant issue. This paper proposes a new method with dynamic routing table. The routing table is maintained by each switching node. When a Noc system starts, each switching node initializes its routing table by appending surrounding nodes' information, including destination node, next-hop address, and total number of hops and average degree of congestion. Average degree of congestion is the key of the whole algorithm. We define a formula for switching nodes to choose a less congestion route according to average degree of congestion, and the speed of whole system is increased.