The water content of most compounds can be determined with a knowledge of its formula.  An unknown sample can be determined through thermogravimetric analysis (TGA) where the sample is heated strongly, and the accurate weight of a sample is plotted against the temperature. The amount of water driven off is then divided by the molar mass of water to obtain the number of molecules of water bound to the salt.