A detailed examination of the energy landscape, density of states, and magnetic moment of tetragonally distorted ferromagnetic Ni2MnGa was performed using first-principles local-spin-density (LSD) pseudopotential calculations, varying V as well as c/a. The energy of tetragonal Ni2MnGa is found to be nearly constant for values of c/a over a wide range, with shallow minima near c/a = 1 and 1.08 in addition to that near 1.2, This flat energy surface is consistent with the wide range of observed values of c/a. It also explains the observation of pseudomorphic growth of Ni2MnGa on GaAs, despite a nominal 3% lattice mismatch. The related materials Ni2MnAl, Ni2MnIn, and ferromagnetic NiMn were examined for similar behavior, but all are seen to have a single well-defined minimum at c/a near 1, consistent with available experimental information. For NiMn, the ground-state antiferromagnetic ordering and structural parameters are correctly predicted within the LSD approach.