I assume this question is related to determining the amount of water that is inside the crystalline structure of a hydrate compound such as copper sulfate , magnesium carbonate, calcium sulfate. The water molecules form part of regular crystal structure and a fixed number of water molecules are associated with the hydrate molecules.
Like Calcium Sulfate is actually Ca SO₄ · 2 H₂ O, a dihydrate. So two water molecules for every calcium sulfate are present in the crystal.
We take a known mass x of the hydrate and heat it to dryness. When all the water evaporates, the anhydrous compound is left with us. then mass y of the compound is found. Now the mass of water molecule in hydrate is x-y. Its percentage of x gives the percentage of water in the given hydrate.
that is: (x-y) * 100 / x is the percentage of water.
Ca SO₄ · 2 H₂ O (solid crystal) ==> Ca SO₄ (solid crystal) + 2 H₂ O (vapor)
(y / molecular weight of Ca SO₄) : [ (x-y) / molecular weight of H₂ O ]
gives the ratio of number of molecules of calcium sulphate to number of molecules of water in the hydrate.
Due to practical errors, we have a small deviation usually less than 1% in the percentages calculated in this manner.