We study the magnetic interactions in Ni-Mn-based Heusler alloys which are suitable candidates for refrigeration based on magnetocaloric, barocaloric, and elastocaloric effects, where the adiabatic temperature change of the Heusler material is induced by applying a magnetic field, hydrostatic pressure, or compressive strain. The predominantly ferromagnetic interactions of the Heusler alloys with austenite cubic structure at high temperatures are modified by the appearance of antiferromagnetic interactions in the alloys with Mn-excess because of the much shorter distances between the Mn-excess atoms and those on the original Mn-sublattice. This leads to a larger entropy change across the magnetostructural transformation in Ni50Mn25+x(Ga,In,Sn,Sb)25−x alloys and is also responsible for the appearance of the inverse magnetocaloric effect in the martensitic phase. In Ni-excess Ni-Mn-Ga alloys the influence of antiferromagnetic correlations is weaker and the large entropy change across the magnetostructural transition is mainly caused by the disorder introduced in the Mn sublattice by the excess Ni atoms. We find that the magnetocaloric effect and other functional properties like the magnetic shape-memory effect and the exchange bias effect, are governed by these complex mixed magnetic features.