The paper introduces a method for calculating the strain energy dissipated during cyclic loading based on Prandtl-Ishlinskii hysteresis operators. The dissipated strain energy is cal- culated continuously throughout the loading procedure, the main advantage of the method being independence from the incremental step size. The Prandtl-Ishlinskii energy model is applied to a rheological model for magnesium alloy AZ31 that correctly simulates the material's complex response when subjected to arbitrary uniaxial loading at room temperature. This approach gives a fast and accurate value of the dissipated strain energy which in turn can be used for estimating the fatigue life of magnesium alloys.