Given a conePof positive functions and an operatorS: →Pwith an additive group, we extend the concept ofK-divisibility to get some new formulas for theK-functional of finite families of lattices. Applications are given in the setting of rearrangement invariant spaces and weighted Lorentz spaces. As a consequence of our results, we also obtain a generalized Holmstedt formula due to Asekritova