Convert molecules to grams, grams to molecules or moles to grams for water, CO2, NaCl, glucose and other substances, or enter a custom molar mass.

For ionic solids such as NaCl, count formula units rather than molecules.

Scientific notation works, e.g. 6.02e23 or 6.02 x 10^23.

Optional settings


Related Calculators

Calculator Functions

FunctionWhat it doesWhat it requires
Molecules to gramsConverts a number of molecules to their mass in grams, milligrams or kilogramsRequires the molecule count and the substance or its molar mass
Grams to moleculesConverts a mass to the number of molecules it containsRequires the mass and the substance or its molar mass
Moles to gramsConverts an amount in moles or millimoles to grams, and gives the number of moleculesRequires the amount of substance and the substance or its molar mass

The substance list holds nine common compounds with their molar masses, and Custom molar mass accepts any value in g/mol or kg/mol. Counts can be typed in scientific notation, such as 6.02e23 or 6.02 x 10^23. Every result also shows the amount in moles. For an ionic solid such as sodium chloride the count is in formula units, not molecules.

Molecules to Gram Formulas

m = N ร— M รท NA
mMass (g)
NNumber of molecules, or formula units for an ionic solid
MMolar mass of the substance (g/mol)
NAAvogadro constant, exactly 6.02214076 ร— 1023 per mole [1]

One mole of any substance contains exactly 6.02214076 ร— 1023 of its elementary entities, which may be atoms, molecules, ions or other specified particles [2]. Dividing a count by NA gives moles, and multiplying moles by the molar mass gives grams.

Molecules to grams

The count is divided by the Avogadro constant and multiplied by the molar mass. For 1.2044 ร— 1024 molecules of water at 18.015 g/mol, the amount is 1.2044 ร— 1024 รท 6.02214076 ร— 1023 = 1.99995 mol, and the mass is 1.99995 ร— 18.015 = 36.029 g. A single water molecule has a mass of 18.015 รท 6.02214076 ร— 1023 = 2.9915 ร— 10โˆ’23 g. For a compound that is not in the list, such as nitrogen dioxide at 46.0055 g/mol, 1 ร— 1023 molecules have a mass of 7.6394 g.

Grams to molecules

N = m รท M ร— NA

This is the main formula solved for the count. One gram of water is 1 รท 18.015 = 0.055509 mol, which is 3.34285 ร— 1022 molecules. A mass of 44.01 g of carbon dioxide is one mole, or 6.02214 ร— 1023 molecules.

Moles to grams

m = n ร— M

n is the amount in moles. One mole of water is 18.015 g, and 5.65 mol of water is 5.65 ร— 18.015 = 101.785 g, containing 5.65 ร— NA = 3.40251 ร— 1024 molecules. An amount in millimoles is divided by 1,000 first.

Molar masses in the substance list

The list uses rounded molar masses. The table sets them beside the molecular weights in the NIST Chemistry WebBook [3]. The largest gap is for nitrogen gas, about 0.02%. A custom molar mass gives full precision.

SubstanceMolar mass used (g/mol)NIST value (g/mol)
Water (Hโ‚‚O)18.01518.0153
Carbon dioxide (COโ‚‚)44.0144.0095
Sodium chloride (NaCl)58.4458.443
Glucose180.16180.1559
Oxygen gas3231.9988
Nitrogen gas28.0228.0134
Ammonia17.03117.0305
Ethanol46.0746.0684
Sulfuric acid98.0898.078

Limits of This Estimate

  • The count and the molar mass must describe the same particle. A count of molecules goes with the molar mass of the molecule, and a count of formula units goes with the molar mass of the formula.
  • Molar masses in the list are rounded and assume the natural mix of isotopes. A sample with a different isotopic makeup needs a custom molar mass.
  • A count of molecules in a real sample is itself an estimate, so the mass carries the same uncertainty as the count.

Sources

  1. NIST, CODATA Value: Avogadro constant: exact value of the Avogadro constant
  2. NIST, SI Units: Amount of Substance: definition of the mole and the entities it can count
  3. NIST Chemistry WebBook, SRD 69: molecular weights of the nine listed substances