Type a chemical formula using correct capitalisation, such as C6H12O6 or Ca(OH)2, and the molar mass appears immediately with each element's atom count, contribution in grams per mole and percentage by mass.
Yes. Nested brackets such as Ca(OH)2 and Al2(SO4)3 are parsed correctly at any depth, and hydrates written with a dot or a middle dot, like CuSO4.5H2O or Na2CO3·10H2O, apply the leading coefficient to the whole water portion.
Masses use IUPAC standard atomic weights, so CuSO4·5H2O comes out at about 249.68 g/mol. Your textbook may differ in the last digit if it rounds atomic weights to one or two decimal places before adding them up.
For each element it gives the total mass contributed by that element divided by the molar mass of the whole compound, which is exactly what a percentage composition question asks for and what you compare against empirical formula data.