If you have the number of grams and not moles, divide the # grams by the atomic wt or molar mass to convert to moles, then divide that by the volume (in liters) to get molarity. Source(s): Simonizer1218 Â· 7 years ago. Thumbs up.