MW = Σ(A × n)  ·  Formula Parser  ·  % Composition

Molecular Weight
Calculator

Enter any chemical formula — H₂O, NaCl, C₆H₁₂O₆, CuSO₄·5H₂O — and instantly get molar mass, element breakdown, percent composition, and moles/mass/molecules converter.

118
Elements
( )
Parentheses
%
Composition
Nₐ
Avogadro
⚗️
Molecular Weight Calculator
Enter a chemical formula below
Quick Formulas
Common Compounds

Click to Calculate Instantly

Click any compound to load its formula and see the full breakdown.

H₂O
Water
18.015 g/mol
NaCl
Sodium Chloride
58.443 g/mol
CO₂
Carbon Dioxide
44.010 g/mol
H₂SO₄
Sulfuric Acid
98.072 g/mol
C₆H₁₂O₆
Glucose
180.156 g/mol
NaOH
Sodium Hydroxide
39.997 g/mol
C₁₂H₂₂O₁₁
Sucrose
342.297 g/mol
Ca(OH)₂
Calcium Hydroxide
74.093 g/mol
Al₂(SO₄)₃
Aluminum Sulfate
342.151 g/mol
KMnO₄
Potassium Permanganate
158.034 g/mol
C₂H₅OH
Ethanol
46.068 g/mol
Fe₂O₃
Iron(III) Oxide
159.688 g/mol
Atomic Mass Reference

Most Common Elements in Chemistry

Standard atomic weights (IUPAC 2021) used in all calculations.

SymbolNameAtomic Mass (g/mol)Atomic #Common in
HHydrogen1.0081Water, acids, organic compounds
CCarbon12.0116All organic molecules
NNitrogen14.0077Proteins, DNA, fertilizers
OOxygen15.9998Water, oxides, organic compounds
NaSodium22.99011Salts, NaOH, NaCl
MgMagnesium24.30512Chlorophyll, Epsom salt
AlAluminum26.98213Alum, Al₂O₃
PPhosphorus30.97415DNA, ATP, fertilizers
SSulfur32.0616H₂SO₄, amino acids
ClChlorine35.45317HCl, NaCl, bleach
KPotassium39.09819KCl, KOH, KMnO₄
CaCalcium40.07820CaCO₃, Ca(OH)₂, CaCl₂
FeIron55.84526Fe₂O₃, FeSO₄
CuCopper63.54629CuSO₄, Cu₂O
ZnZinc65.3830ZnO, ZnSO₄
BrBromine79.90435HBr, organic synthesis
AgSilver107.86847AgNO₃, AgCl
IIodine126.90453KI, iodine solutions
BaBarium137.32756BaSO₄, BaCl₂
PbLead207.282PbSO₄, PbO
💡

Case Sensitivity Matters in Chemical Formulas

Chemical element symbols are case-sensitive: Co (cobalt, 58.93 g/mol) ≠ CO (carbon monoxide, 28.01 g/mol). Ca (calcium) ≠ CA (invalid). Always capitalize the first letter and use lowercase for the second letter. Our parser follows standard chemical formula notation — use parentheses for groups like Ca(OH)₂, not Ca(oh)₂.

🔬
How to Read a Chemical Formula

Subscripts (numbers after elements) indicate the count of that atom. H₂O = 2 hydrogen + 1 oxygen. No subscript means 1.

Parentheses group atoms multiplied by the subscript outside: Ca(OH)₂ = 1 Ca + 2 O + 2 H. Nested parentheses work outward.

Hydrates are written with a dot: MgSO₄·7H₂O (Epsom salt). The water molecules are counted in the total MW.

⚖️
Moles, Mass & Molecules

The molar mass connects the macroscopic and atomic scales: 1 mole of any substance = its MW in grams and contains 6.022 × 10²³ particles (Avogadro's number).

Example: 180.16 g of glucose = 1 mole = 6.022 × 10²³ molecules. 90.08 g = 0.5 mol = 3.011 × 10²³ molecules. This is why MW is indispensable for stoichiometric calculations in lab work.

How to Calculate Molecular Weight from a Chemical Formula

Molecular weight (molar mass) is calculated by summing the atomic masses of all atoms in the chemical formula, accounting for the number of each atom present.

Basic Formula

MW = Σ (atomic mass of element × number of atoms) Simple example — Water (H₂O): H: 2 × 1.008 = 2.016 O: 1 × 15.999 = 15.999 Total MW = 18.015 g/mol Acid example — Sulfuric Acid (H₂SO₄): H: 2 × 1.008 = 2.016 S: 1 × 32.060 = 32.060 O: 4 × 15.999 = 63.996 Total MW = 98.072 g/mol

Handling Parentheses

Ca(OH)₂ → expand: Ca + 2×O + 2×H Ca: 1 × 40.078 = 40.078 O: 2 × 15.999 = 31.998 H: 2 × 1.008 = 2.016 Total MW = 74.092 g/mol Al₂(SO₄)₃ → expand: 2Al + 3S + 12O Al: 2 × 26.982 = 53.964 S: 3 × 32.060 = 96.180 O: 12 × 15.999 = 191.988 Total MW = 342.132 g/mol

Percent Composition

% element = (atoms × atomic mass / MW) × 100 Water (H₂O, MW = 18.015): % H = (2 × 1.008 / 18.015) × 100 = 11.19% % O = (15.999 / 18.015) × 100 = 88.81% NaCl (MW = 58.443): % Na = (22.990 / 58.443) × 100 = 39.34% % Cl = (35.453 / 58.443) × 100 = 60.66%

Moles, Mass & Molecules

Moles = Mass (g) / MW (g/mol) Mass = Moles × MW Molecules = Moles × 6.02214076 × 10²³ Avogadro constant (Nₐ) = 6.02214076 × 10²³ mol⁻¹ Example — 50g of NaCl (MW = 58.443): Moles = 50 / 58.443 = 0.8556 mol Molecules = 0.8556 × 6.022×10²³ = 5.153×10²³

Frequently Asked Questions

Molecular weight (MW) — also called molar mass — is the sum of atomic masses of all atoms in a chemical formula, expressed in g/mol. For H₂O: 2(1.008) + 15.999 = 18.015 g/mol. It tells you how much one mole (6.022 × 10²³ molecules) of a substance weighs. It's used to convert between mass and moles in all chemical calculations.
MW = sum of (atomic mass × atom count) for each element. Find each element's atomic mass from the periodic table. Multiply by the subscript count. Sum all contributions. Example H₂SO₄: H=2×1.008=2.016, S=1×32.06=32.06, O=4×15.999=63.996. Total=98.072 g/mol. Our calculator does this automatically — just type the formula.
Technically: molecular weight is dimensionless (a ratio), molar mass is in g/mol. In practice, they're used interchangeably — the numerical values are identical. "The MW of NaCl is 58.44" and "the molar mass of NaCl is 58.44 g/mol" mean the same thing in a lab context. Our calculator shows the value as g/mol (molar mass).
Percent composition = (element's total mass / molecular weight) × 100. For NaCl: %Na = (22.99/58.44)×100 = 39.3%, %Cl = 60.7%. Used to verify a compound's identity, calculate empirical formulas from experimental data, and check stoichiometry. Our calculator shows the % for every element in the formula.
Moles = mass (g) ÷ molar mass (g/mol). Example: 90g of water (MW=18.015) = 90/18.015 = 4.996 mol. Reverse: mass = moles × MW. Use the moles converter in our calculator — enter any mass to instantly see moles, and vice versa. This is the most fundamental calculation in quantitative chemistry.
Nₐ = 6.02214076 × 10²³ per mole (exactly, by SI definition since 2019). It's the number of particles in one mole. 1 mole of H₂O = 6.022×10²³ water molecules. This constant bridges atomic-scale quantities (individual atoms) to laboratory-scale masses (grams). Molecules = moles × Nₐ; moles = molecules ÷ Nₐ.
Empirical formula = simplest whole-number ratio of atoms. Molecular formula = actual atom counts. Glucose molecular formula C₆H₁₂O₆ (MW=180.16), empirical formula CH₂O (MW=30.03). Molecular = empirical × n, where n = molecular MW / empirical MW = 180/30 = 6. Combustion analysis gives empirical formulas; mass spectrometry gives molecular MW to find n.
Parentheses multiply everything inside by the subscript outside. Ca(OH)₂ = Ca + 2O + 2H. Al₂(SO₄)₃ = 2Al + 3S + 12O. Nested: Mg₃(PO₄)₂ = 3Mg + 2P + 8O. Our formula parser handles all parentheses automatically, including nested groups. Just type the formula with standard notation.
A hydrate includes water molecules in its crystal structure, written with a dot: CuSO₄·5H₂O (copper sulfate pentahydrate). MW = CuSO₄ (159.61) + 5×H₂O (90.08) = 249.69 g/mol. When dissolving hydrates, the water is included in the mass weighed. Always check if a compound is anhydrous or a specific hydrate before making solutions.
Standard atomic weights (what we use) are weighted averages of naturally occurring isotopes. Chlorine = 35.453 because it's ~75.8% Cl-35 and ~24.2% Cl-37. For mass spectrometry, exact monoisotopic masses are used instead. For typical lab calculations and solution preparation, standard atomic weights (average masses) are always used — which is what our calculator uses.