The rank of a ring R is the supremum of minimal cardinalities of generating sets of I, among all ideals I in R. In this paper, we obtain a characterization of Noetherian rings R whose rank is not equal to the supremum of ranks of localizations of R at maximal ideals. It turns out that any such ring is a direct product of a finite number of local principal Artinian rings and Dedekind domains, at least one of which is not a principal ideal ring. As an application, we show that the rank of the ring of polynomials over an Artinian ring can be computed locally.