  Relative magnetic helicity is conserved by magneto-hydrodynamic evolution
even in the presence of moderate resistivity. For that reason, it is often
invoked as the most relevant constraint to the dynamical evolution of plasmas
in complex systems, such as solar and stellar dynamos, photospheric flux
emergence, solar eruptions, and relaxation processes in laboratory plasmas.
However, such studies often indirectly imply that relative magnetic helicity in
a given spatial domain can be algebraically split into the helicity
contributions of the composing subvolumes, i.e., that it is an additive
quantity. A limited number of very specific applications have shown that this
is not the case. Progress in understanding the non-additivity of relative
magnetic helicity requires removal of restrictive assumptions in favour of a
general formalism that can be used both in theoretical investigations as well
as in numerical applications. We derive the analytical gauge-invariant
expression for the partition of relative magnetic helicity between contiguous
finite-volumes, without any assumptions on either the shape of the volumes and
interface, or the employed gauge. The non-additivity of relative magnetic
helicity in finite volumes is proven in the most general, gauge-invariant
formalism, and verified numerically. More restrictive assumptions are adopted
to derive known specific approximations, yielding a unified view of the
additivity issue. As an example, the case of a flux rope embedded in a
potential field shows that the non-additivity term in the partition equation
is, in general, non-negligible. The relative helicity partition formula can be
applied to numerical simulations to precisely quantify the effect of
non-additivity on global helicity budgets of complex physical processes.
