Solubility is sensitive to changes in temperature. For example, sugar is more soluble in hot water than cool water. It occurs because solubility products, like other types of equilibrium constants, are functions of temperature. In accordance with Le Chatelier's Principle, when the dissolution process is endothermic (heat is absorbed), solubility increases with rising temperature. This effect is the basis for the process of recrystallization, which can be used to purify a chemical compound. When dissolution is exothermic (heat is released) solubility decreases with rising temperature.
Sodium sulfate shows increasing solubility with temperature below about 32.4 °C, but a decreasing solubility at higher temperature. This is because the solid phase is the decahydrate () below the transition temperature, but a different hydrate above that temperature.
The dependence on temperature of solubility for an ideal solution (achieved for low solubility substances) is given by the following expression containing the enthalpy of melting, ΔH, and the mole fraction  of the solute at saturation:
where  is the partial molar enthalpy of the solute at infinite dilution and  the enthalpy per mole of the pure crystal.
This differential expression for a non-electrolyte can be integrated on a temperature interval to give:
For nonideal solutions activity of the solute at saturation appears instead of mole fraction solubility in the derivative with respect to temperature: