From an aqueous solution, calcium sulfate is deposited as crystals of gypsum, but when the solution contains an excess of sodium or potassium chloride, anhydrite is deposited if the temperature is above 40 °C .