The holonomic rank of the A-hypergeometric system MA(β) is the degree of the toric ideal IA for generic parameters; in general, this is only a lower bound. To the semigroup ring of A we attach the ranking arrangement and use this algebraic invariant and the exceptional arrangement of non-generic parameters to construct a combinatorial formula for the rank jump of MA(β). As consequences, we obtain a refinement of the stratification of the exceptional arrangement by the rank of MA(β) and show that the Zariski closure of each of its strata is a union of translates of linear subspaces of the parameter space. These results hold for generalized A-hypergeometric systems as well, where the semigroup ring of A is replaced by a non-trivial weakly toric module M⊆ℂ[ℤA] . We also provide a direct proof of the main result in [M. Saito, Isomorphism classes of A-hypergeometric systems, Compositio Math. 128 (2001), 323–338] regarding the isomorphism classes of MA (β) .