Molecular Weight Calculator
Type a chemical formula and get the molar mass in g/mol, with each element’s mass contribution and percentage.
Molecular weight of C6H12O6
180.156 g/mol
- C × 6 (12.011 g/mol)
- 72.066 g/mol · 40.00%
- H × 12 (1.008 g/mol)
- 12.096 g/mol · 6.71%
- O × 6 (15.999 g/mol)
- 95.994 g/mol · 53.28%
Molecular weight (molar mass) is the sum of the standard atomic weights of every atom in the formula. Atomic weights are from the IUPAC 2021 standard table (CIAAW). The percentage column gives each element’s mass fraction — useful for stoichiometry and composition checks.
How to use this calculator
Type a chemical formula using standard element symbols and counts: water as H2O, carbon dioxide as CO2, glucose as C6H12O6. Parentheses are allowed for groups, e.g. calcium hydroxide as Ca(OH)2 or iron(III) sulfate as Fe2(SO4)3. Capitalisation matters — Co is cobalt, CO is carbon monoxide. The result shows the molecular weight in grams per mole plus a per-element breakdown.
How the calculation works
Molecular weight is the sum of the standard atomic weights of every atom in the formula. The calculator parses your formula into element-count pairs, looks up each element’s standard atomic weight from the IUPAC 2021 table maintained by the Commission on Isotopic Abundances and Atomic Weights (CIAAW), and sums contributions. For elements with a range-style standard atomic weight (H, Li, B, C, N, O, Mg, Si, S, Cl, Br, Tl) the conventional single-value representative is used. The result is reported in grams per mole; the same number in atomic mass units (u) gives the average mass of one molecule.
Worked example
Glucose, C6H12O6: 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol. So 1 mole of glucose weighs about 180.16 g, and the molecule is roughly 40% carbon, 6.7% hydrogen, and 53.3% oxygen by mass.
Frequently asked questions
What’s the difference between molecular weight, molar mass, and molecular mass?
In everyday chemistry the three terms are used interchangeably. Strictly: molecular weight is a dimensionless ratio of average molecular mass to 1/12 of the mass of a carbon-12 atom; molar mass is the mass of one mole of the substance in grams per mole (g/mol); molecular mass is the mass of one molecule in atomic mass units (u, or Da). Numerically all three are the same — a substance with molecular weight 180.16 has molar mass 180.16 g/mol and molecular mass 180.16 u.
Where do the atomic weights come from?
From IUPAC’s Commission on Isotopic Abundances and Atomic Weights (CIAAW), which publishes the current standard atomic weights and updates them as measurement improves. This calculator uses the 2021 conventional values. For elements whose published value is an interval (because natural isotopic composition varies between sources — hydrogen, lithium, boron, carbon, nitrogen, oxygen, magnesium, silicon, sulfur, chlorine, bromine, thallium), CIAAW publishes a representative single number; that is the value used here.
How precise is the result?
About four significant figures for common organic and inorganic molecules. The dominant source of uncertainty is natural variation in isotopic composition — for hydrogen, oxygen, and a handful of others, the actual molar mass of a specific sample can differ from the standard value by tens of parts per million. For lab-scale stoichiometry that uncertainty is irrelevant; for high-precision mass spectrometry you would use isotopically resolved (monoisotopic) masses instead of standard atomic weights.
Does the calculator handle hydrates and ions?
Hydrates expressed in expanded form work — e.g. CuSO4 followed by H2O atoms in line will sum correctly, and you can write copper(II) sulfate pentahydrate as CuSO4(H2O)5 to include the water of crystallisation. Charges (Cu2+, SO4^2-) and the centred-dot notation (CuSO4·5H2O) are not parsed; use parentheses instead. Element symbols are case-sensitive: Co is cobalt, CO is carbon monoxide.
How do I get the mass percentage of each element?
Divide each element’s total contribution (count × atomic weight) by the molecular weight, then multiply by 100. The calculator does this automatically — each row in the breakdown shows the contribution in g/mol and the corresponding percentage. For glucose, carbon contributes 72.066 / 180.156 ≈ 40.00%, hydrogen 6.71%, oxygen 53.29%.
Why do I need molecular weight in the lab?
To convert between mass and moles. If a reaction needs 0.10 mol of glucose, you weigh out 0.10 × 180.16 = 18.0 g. Molecular weight also drives solution preparation (a 1 M glucose solution is 180.16 g/L), gas-law calculations through the ideal gas equation, and any percentage-composition or empirical-formula problem in stoichiometry.