An ultimate goal of material scientists is the prediction of the thermodynamics of tailored materials solely based on first principles methods. The present work reviews recent methodological developments and advancements providing thereby an up-to-date basis for such an approach. Key ideas and the performance of these methods are discussed with respect to the Heusler alloy Ni–Mn–Ga – a prototype magnetic shape-memory alloy of great technological interest for various applications. Ni–Mn–Ga shows an interesting and complex sequence of phase transitions, rendering it a significant theoretical challenge for any first principles approach. The primary goal of this investigation is to determine the composition dependence of the martensitic transition temperature in these alloys. Quasiharmonic phonons and the magnetic exchange interactions as well as the delicate interplay of vibrational and magnetic excitations are taken into account employing density functional theory.