The minimum-cost flow problem is: Given a network with n vertices and m edges, find a maximum flow of minimum cost. Many network problems are easily reducible to this problem. A polynomial-time algorithm for the problem has been known for some time, but only recently a strongly polynomial algorithm was discovered. In this paper an O(n2(m+nlogn)logn) algorithm is designed. The previous best algorithm, due to Fujishige and Orlin, had an O(m2(m+nlogn)logn) time bound. Thus, for dense graphs an improvement of two orders of magnitude is obtained. The algorithm in this paper is based on Fujishige’s algorithm (which is based on Tardos’s algorithm). Fujishige’s algorithm consists of up to m iterations, each consisting of O(mlogn) steps. Each step solves a single source shortest path problem with nonnegative edge lengths. The algorithm is modified in order to make an improved analysis possible. The new algorithm may still consist of up to m iterations, and an iteration may still consist of up to O(mlogn) steps, but it can still be shown that the total number of steps is bounded by O(n2logn). The improvement is due to a new technique that relates the time spent to the progress achieved.