We know that the formula of Sodium Hydroxide is NaOH. The compound contains one sodium atom, one oxygen atom and one hydrogen atom.
We know the atomic masses of all the atoms
Na = 22.989 g/mol
O = 15.999 g/mol
H = 1.008 g/mol
On Adding all the molar masses of what composes sodium hydroxide (NaOH)
22.989 g/mol + 15.999 g/mol + 1.008 g/mol= 39.996 g/ mol
Total molar mass of sodium hydroxide is 39.996 g/mol