the molar mass of H2O can be calculated with the following method:M(H2O)=2x M(H) + M(O), that is because we know that M(H)=1g/mol, M(O)=16g/mol, so M(H2O)=2x1+16=18g/mol, that means 1 mole of H2O contains 18g, so finally one mole of H2O correspond to 18 grams.