n = m/m
n is the number of moles
m is the mass (in grams)
M is the molar mass of the chemical formula.
For example, when converting 500 grams to moles for HCl (hydrochloric acid) you would do the following:
M = 36.461g/mol
500/36.461 = 13.71328
The last step is to make sure the significant digits are concordant with the data given. Usually on your Periodic Table of Elements, the molar mass will be 4 significant digits. In this case, I used 3 sig digs for the amount of grams. Thus, your answer, rounded to the lowest number of significant digits would be: