The Jiles-Atherton effective field theory of ferromagnetic hysteresis is consistently extended to describe the magnetomechanical effect. Whereas Jiles has proposed two such models, one for constant stress and a different one for varying stress, our formalism includes both situations. It is also possible to simultaneously vary applied field and stress and calculate the resulting magnetization. This theoretical development is based on the derivation of exact differentials by means of an integrating factor. These differentials can yield the respective differential equations for the magnetization as function of the magnetic field or depending on stress. Our numerical implementation directly uses the integrated differential and the result for the magnetization as a function of the effective field. This iterative procedure also enables to determine the magnetization for possibly simultaneously varying magnetic field and stress. For constant stress the known results of effective field theory are reproduced. Some illustrative new examples are given.