Molecular Weight Calculator Formula
Understand the math behind the molecular weight calculator. Each variable explained with a worked example.
Formulas Used
Molecular Weight
mw = c_atoms * 12.011 + h_atoms * 1.008 + o_atoms * 15.999 + n_atoms * 14.007 + s_atoms * 32.065Variables
| Variable | Description | Default |
|---|---|---|
c_atoms | Number of Carbon Atoms | 6 |
h_atoms | Number of Hydrogen Atoms | 12 |
o_atoms | Number of Oxygen Atoms | 6 |
n_atoms | Number of Nitrogen Atoms | 0 |
s_atoms | Number of Sulfur Atoms | 0 |
How It Works
Molecular Weight Calculation
The molecular weight (molar mass) of a compound is the sum of the atomic weights of all atoms in its molecular formula.
Formula
MW = sum(n_i × AW_i)
where n_i is the number of atoms of element i and AW_i is the standard atomic weight. Standard atomic weights: C = 12.011, H = 1.008, O = 15.999, N = 14.007, S = 32.065 g/mol.
Worked Example
Calculate the molecular weight of glucose (C6H12O6).
- 01C contribution: 6 × 12.011 = 72.066
- 02H contribution: 12 × 1.008 = 12.096
- 03O contribution: 6 × 15.999 = 95.994
- 04MW = 72.066 + 12.096 + 95.994 = 180.156 g/mol
Frequently Asked Questions
What is the difference between molecular weight and formula weight?
Molecular weight applies to discrete molecules. Formula weight applies to ionic compounds like NaCl, which form lattices rather than molecules. The calculation method is the same.
Why are atomic weights not whole numbers?
Atomic weights reflect the natural isotopic distribution. Carbon is mostly C-12 but contains some C-13, giving an average atomic weight of 12.011. Only pure isotopes have near-integer masses.
How is molecular weight used in lab work?
To convert between moles and grams: grams = moles × MW. To prepare a 1 M solution, dissolve one MW worth of grams in enough solvent to make 1 liter.
Ready to run the numbers?
Open Molecular Weight Calculator