Molarity is a measure of moles per liter. So you need to set up the equation as [m] = moles/liters. So if you need a 10 ml solution with a .4m concentration you need to fill the equation in. You know you need [m] to equal .4 and you know you need .010 liters. So solve for moles. .4 = x/.01 == .4*.01=.004. So you need .004 moles of your molecule. A mole is 6.022 x 10^{23} (602200000000000000000000). So next what you need to do is find the molar mass of you molecule which is found of the periodic table. For example H_{2}O_{2} (hydrogen peroxide) would have a molar mass of O=16 H=1 so ((16*2)+(1*2))= 34 grams a mole. Once you found how many grams a mole your molecule is then you times it times your wanted moles, in your case .004, and you have how many grams you need to put into your solution._{}