Sample mass in grams and molar mass (g/mol)—amount of substance in moles.
Moles = mass (g) ÷ molar mass (g/mol). Both must be positive; the result is shown to eight decimals. Isotopic averages and salt formula units are up to you.
This calculator uses plain decimal numbers. If a result looks wrong, check whether you used a comma instead of a dot (or vice versa) where the field expects one.