The magnetocaloric effect that originates from the martensitic transition in the ferromagnetic Ni-Mn-Ga
shape-memory alloy is studied. We show that this effect is controlled by the magnetostructural coupling at both
the martensitic variant and magnetic domain length scales. A large entropy change induced by moderate
magnetic fields is obtained for alloys in which the magnetic moment of the two structural phases is not very
different. We also show that this entropy change is not associated with the entropy difference between the
martensitic and the parent phase arising from the change in the crystallographic structure which has been
found to be independent of the magnetic field within this range of fields