Calculation of temperature range for spontaneity