To calculate the moles of MgSO4.7H2O, we find the molar mass equals 246, thus moles = 32 / 246 = 0.13 moles. Upon heating, all 7 H2O from one molecule will evaporate. The total moles of H2O present amount to 7 x 0.13 = 0.91, and the mass of that H2O is 0.91 x 18 = 16.38g. Therefore, the mass of the anhydrous MgSO4 that remains is 32 - 16.38 = 15.62 g.