Anhydrous magnesium acetate has the chemical formula Mg(CH3COO)2 and in its hydrated form, magnesium acetate tetrahydrate, it has the chemical formula Mg(CH3COO)2*4H2O.
The compounds of every Wikipedia article carrying a Chembox or a Drugbox, refreshed daily, with the values their infoboxes give. The pages need JavaScript; the API does not.