Mud motor failure should be avoided where possible and a lot of research has gone into understanding potential mitigation strategies. Previous research performed for the RAPID group at the University of Texas at Austin identified stalls as a leading cause for mud motor damage and failure, yet very little research has been done to investigate them. Temperature is known to be leading factor in reducing mud motor life and will likely be more important now than it was in the past as drilling operations increase in complexity. In this work, we present two different algorithms designed to run while drilling. The first is a statistics-based stall detection algorithm designed to run on surface data. Where stall detection has previously based itself only on the Differential Pressure, our approach requires three simultaneous peaks in MSE, WOB and Differential Pressure. The second is a temperature model for the estimation of bottomhole temperature which can serve as a real-time advisory alerting if the temperature exceeds the motor rating. Both could be implemented in a damage index for the estimation of mud motor degradation at any timePetroleum and Geosystems Engineerin