Magnesium Sulphate is a chemical compound containing magnesium, sulfur and oxygen, with the formula MgSO4. In its hydrated form, the pH is 6.0 (5.5 to 6.5). It is often encountered as the heptahydrate, MgSO4·7H2O, commonly called Epsom salt. Anhydrous magnesium sulfate is used as a drying agent. Since the anhydrous form is hygroscopic (readily absorbs water from the air) and is therefore difficult to weigh accurately, the hydrate is often preferred when preparing solutions, for example in medical preparations. Epsom salt has been traditionally used as a component of bath salts.