Hydrate Formula Calculator
Find the number of water molecules in a hydrate from mass before and after heating.
What it does
A hydrate is a salt that has water molecules bound into its crystal structure. Heating drives that water off and leaves the anhydrous salt. The mass difference tells you how much water was present, and the mole ratio tells you how many water molecules belong to each formula unit.
This tool takes the anhydrous salt formula and the two measured masses. It computes the salt molar mass from a built in atomic weight table, converts both masses to moles, divides the moles of water by the moles of salt, and rounds to a whole number.
The page opens with a magnesium carbonate hydrate that weighs 15.67 grams before heating and 7.58 grams afterward. The water mass is 8.09 grams. That corresponds to roughly 0.449 moles of water and 0.0899 moles of magnesium carbonate, giving a ratio very close to five.
The result is written as MgCO3 with a dot followed by 5H2O. The tool also reports the percent water, which is a useful check against published hydrate compositions.
A ratio that is not close to a whole number means the measurement was inaccurate or the sample decomposed rather than simply losing water. The tool reports an error in that case instead of rounding a poor result.
How to use
- Enter the formula of the anhydrous salt with correct capitalization.
- Enter the mass of the hydrate before heating.
- Enter the mass after heating to constant mass.
- Read the hydrate formula as the main result.
- Check the moles of salt and water to follow the ratio.
- Compare the percent water with a literature value if available.
Formula
- mass lost
- Hydrate mass minus anhydrous mass, in grams.
- 18.015
- Molar mass of water in grams per mole.
- molar mass of salt
- Formula mass of the anhydrous salt in grams per mole.
- x
- Number of water molecules per formula unit, a whole number.
The experiment assumes heating removes only water and leaves the salt unchanged. A ratio within 0.15 of an integer is accepted to allow ordinary weighing error. The built in atomic weight table covers common elements and is reported through the salt molar mass output.
Worked example
Example: a magnesium carbonate hydrate
The page opens with MgCO3, 15.67 g before heating and 7.58 g after.
- Water lost is 15.67 minus 7.58, which is 8.09 g.
- Molar mass of MgCO3 is about 84.313 g/mol.
- Moles of salt are 7.58 divided by 84.313, about 0.08990 mol.
- Moles of water are 8.09 divided by 18.015, about 0.44907 mol.
- Divide 0.44907 by 0.08990 to get about 4.995, which rounds to 5.
- The hydrate formula is MgCO3·5H2O, with 51.63 percent water.
- The tool reports formula MgCO3·5H2O and waters 5.
Reference table
| Salt | Before heating (g) | After heating (g) | x | Hydrate formula |
|---|---|---|---|---|
| MgCO3 | 15.67 | 7.58 | 5 | MgCO3·5H2O |
| CuCl2 | 2.5 | 1.972 | 2 | CuCl2·2H2O |
| BaCl2 | 1.25 | 1.06 | 2 | BaCl2·2H2O |
Limits
- Assumes only water is lost during heating.
- Supports elements in the built in atomic weight table only.
- The anhydrous mass must be positive and no greater than the hydrate mass.
- Ratios more than 0.15 from a whole number are rejected.
Common mistakes
- Using the hydrate mass instead of the anhydrous mass to compute salt moles.
- Forgetting to subtract to find the water mass.
- Using 18.0 or 20.0 instead of 18.015 for water molar mass.
- Entering a formula with lowercase element symbols.
- Accepting a ratio of 4.5 as five without question.
Try it yourself
Quick checks. Answers sit tucked under each question.
CuCl2 hydrate: 2.5 g before and 1.972 g after. Formula?
CuCl2·2H2O. The mole ratio is about 2.
BaCl2 hydrate: 1.25 g before and 1.06 g after. Formula?
BaCl2·2H2O, with 15.20 percent water.
Why must the ratio be a whole number?
Water molecules occur as whole units in the crystal formula, so fractional values reflect measurement error.
Questions
What is a hydrate?
A salt with water molecules bound in its crystal structure in a fixed ratio.
Why heat to constant mass?
It ensures all the water has been driven off before the final weighing.
How is x found?
Divide moles of water lost by moles of anhydrous salt and round to a whole number.
What molar mass of water is used?
18.015 grams per mole.
What if the ratio is not near a whole number?
The tool reports an error because the data do not support a simple hydrate formula.
Can heating decompose the salt?
Yes, and that breaks the assumption. The tool cannot detect decomposition from two masses alone.
Sources
- Chemistry LibreTexts, empirical formulas and hydrates laboratory manual
- Le Moyne College, determining the formula of a hydrate
- University of Louisiana at Monroe, composition of a hydrate lab