We address the weight-balancing problem for a distributed system whose components (nodes) can exchange information via interconnection links (edges) that form an arbitrary, possibly directed, communication topology (digraph). A weighted digraph is balanced if, for each node, the sum of the weights of the edges outgoing from that node is equal to the sum of the weights of the edges incoming to that node. Weight-balanced digraphs play a key role in a variety of applications, such as coordination of groups of robots, distributed decision making, and distributed averaging which is important for a wide range of applications in signal processing. We propose a distributed algorithm for solving the weight balancing problem in a minimum number of iterations, when the weights are nonnegative real numbers. We also provide examples to corroborate the proposed algorithm.