Molecular Weight from Chemical Formula
Last reviewed: April 2026
Molar mass is the mass of one mole (6.022 × 10²³ particles) of a substance, measured in grams per mole (g/mol). It's calculated by summing the atomic weights of all atoms in the chemical formula. For water (H₂O): 2(1.008) + 15.999 = 18.015 g/mol. Molar mass is essential for stoichiometry, concentration calculations, and converting between mass and moles. This calculator parses standard chemical notation and gives element-by-element breakdowns with mass percentages. For concentration calculations, see our Dilution Calculator.
To convert grams to moles: divide mass by molar mass. To convert moles to grams: multiply moles by molar mass. For example, 36 grams of water = 36/18.015 = 2.0 moles. This is fundamental to balancing chemical equations, calculating yields, and preparing solutions of specific concentrations. The mass percentage composition tells you what fraction of the compound's weight comes from each element.
Water (H₂O): 18.015, Carbon dioxide (CO₂): 44.01, Glucose (C₆H₁₂O₆): 180.16, Sodium chloride (NaCl): 58.44, Sulfuric acid (H₂SO₄): 98.08, Ethanol (C₂H₅OH): 46.07. Knowing these common values helps you quickly estimate quantities in lab settings and real-world applications.
| Compound | Formula | Molar Mass (g/mol) |
|---|---|---|
| Water | H₂O | 18.015 |
| Table salt | NaCl | 58.443 |
| Glucose | C₆H₁₂O₆ | 180.156 |
| Aspirin | C₉H₈O₄ | 180.158 |
| Caffeine | C₈H₁₀N₄O₂ | 194.191 |
Molar mass is the mass of one mole (6.022 × 10²³ particles) of a substance, expressed in grams per mole (g/mol). It serves as the bridge between the atomic scale (individual atoms and molecules) and the macroscopic scale (grams and kilograms that can be measured in a laboratory). To calculate the molar mass of a compound, you sum the atomic masses of all atoms in its chemical formula. For example, water (H₂O) has a molar mass of (2 × 1.008) + (1 × 15.999) = 18.015 g/mol, meaning 18.015 grams of water contains exactly one mole — approximately 6.022 × 10²³ molecules.
Molar mass is foundational to virtually every quantitative chemistry calculation. Stoichiometry — predicting the amounts of reactants consumed and products formed in chemical reactions — requires converting between mass and moles. Solution preparation requires knowing how many grams of a substance to dissolve to achieve a desired molar concentration. Analytical techniques like mass spectrometry directly measure molecular masses. Pharmaceutical dosing, industrial chemical processing, environmental monitoring, and materials science all depend on accurate molar mass calculations to ensure proper proportions, concentrations, and yields.
Calculating molar mass requires the chemical formula of the compound and a periodic table with atomic masses. First, identify each element in the formula and count the number of atoms of each element, paying careful attention to subscripts and parenthetical groups. For calcium nitrate, Ca(NO₃)₂, you have 1 calcium atom, 2 nitrogen atoms (1 N × 2 from the subscript outside the parentheses), and 6 oxygen atoms (3 O × 2). Multiply each element's atom count by its atomic mass from the periodic table: Ca = 1 × 40.078, N = 2 × 14.007, O = 6 × 15.999. Sum these values: 40.078 + 28.014 + 95.994 = 164.086 g/mol.
For hydrated compounds like copper sulfate pentahydrate (CuSO₄·5H₂O), include the water of crystallization in the total. Calculate CuSO₄ (63.546 + 32.065 + 63.996 = 159.607) and add 5 × H₂O (5 × 18.015 = 90.075) for a total molar mass of 249.682 g/mol. Common mistakes include forgetting to multiply subscripts through parenthetical groups, using incorrect atomic masses, and confusing molecular formula with empirical formula (the molecular formula of glucose is C₆H₁₂O₆ with M = 180.16 g/mol, while its empirical formula CH₂O has M = 30.03 g/mol). Our Chemical Equation Balancer complements this calculator for stoichiometry problems.
Stoichiometric calculations use molar mass to convert between the mass of substances and the mole ratios given by balanced chemical equations. For the combustion of methane — CH₄ + 2O₂ → CO₂ + 2H₂O — knowing that 1 mole of CH₄ (16.04 g) reacts with 2 moles of O₂ (63.998 g) allows you to calculate that burning 100 grams of methane requires 100/16.04 × 2 × 32.00 = 399 grams of oxygen and produces 100/16.04 × 44.01 = 274 grams of CO₂.
In solution chemistry, molarity (M) is defined as moles of solute per liter of solution. To prepare 500 mL of a 0.5 M NaCl solution, you calculate: 0.5 mol/L × 0.5 L = 0.25 mol NaCl needed, then 0.25 mol × 58.44 g/mol = 14.61 grams of NaCl to dissolve in water and dilute to 500 mL total volume. Dilution calculations, titration analyses, and buffer preparation all require accurate molar mass values and mole calculations. Percent composition by mass — another fundamental calculation — divides each element's total mass contribution by the compound's molar mass and multiplies by 100.
The atomic masses listed on the periodic table are weighted averages of all naturally occurring isotopes of each element. Carbon has two stable isotopes: carbon-12 (98.93% abundance, mass 12.000) and carbon-13 (1.07% abundance, mass 13.003), giving a weighted average atomic mass of 12.011. This means the molar mass calculated from periodic table values represents the average mass of a mole of the element as it occurs in nature, not the mass of any single isotope.
For most practical chemistry applications, average atomic masses are appropriate. However, in mass spectrometry, isotope tracer studies, radiochemistry, and nuclear science, individual isotope masses become important. The mass of a specific isotope can differ slightly from an integer value due to nuclear binding energy — carbon-12 is defined as exactly 12.000 amu (the standard from which all other atomic masses are measured), but carbon-13 has a mass of 13.00335 amu, not exactly 13. These small deviations, called mass defects, directly relate to nuclear stability and the energy released or absorbed in nuclear reactions through Einstein's famous E = mc² relationship.
Beyond basic chemistry, molar mass plays critical roles in numerous scientific and industrial fields. In pharmacology, drug dosing requires precise molar mass calculations to determine the number of active molecules delivered per dose — molecular weight differences between drug salts (e.g., ibuprofen sodium vs. ibuprofen free acid) affect the actual active ingredient content. In polymer chemistry, weight-average and number-average molecular weights characterize polymer chain length distributions, directly affecting material properties like tensile strength, viscosity, and glass transition temperature.
Environmental science uses molar mass for calculating pollutant concentrations — converting between parts per million by mass and parts per million by volume for gaseous pollutants requires the molar mass of the pollutant relative to the average molar mass of air (approximately 28.97 g/mol). Food science uses molecular weight in formulating food additives, calculating nutritional content, and designing packaging that controls gas permeation rates. Forensic chemistry relies on molar mass in identifying unknown substances through mass spectrometry, where the molecular ion peak directly reveals the compound's molar mass. For related science calculations, explore our pH Calculator and Scientific Notation Calculator.
Having common molar masses memorized speeds up chemistry calculations significantly. Water (H₂O) is 18.015 g/mol, carbon dioxide (CO₂) is 44.009 g/mol, sodium chloride (NaCl) is 58.443 g/mol, glucose (C₆H₁₂O₆) is 180.156 g/mol, sulfuric acid (H₂SO₄) is 98.079 g/mol, and ethanol (C₂H₅OH) is 46.069 g/mol. These values appear repeatedly in general chemistry courses and laboratory work, and knowing them by heart eliminates the need to look up atomic masses for routine calculations.
See also: Dilution Calculator · Half-Life Calculator · Density Calculator · Calorimetry · Dew Point
→ Molar mass is the bridge between the atomic world and the lab scale. You can't count atoms directly, but you can weigh them. One mole (6.022 × 10²³ particles) of any substance has a mass in grams equal to its molar mass. 18 grams of water contains the same number of molecules as 44 grams of CO₂ — one mole each.
→ Watch for common formula entry errors. CO (carbon monoxide, 28 g/mol) vs Co (cobalt, 58.9 g/mol). Parentheses matter: Ca(OH)₂ = 74.1 g/mol, but CaOH₂ would mean something different. Hydrated compounds use the dot: CuSO₄·5H₂O means you add 5 × 18 = 90 g/mol of water. Explore related tools with our Concentration Calculator.
→ Molecular weight and molar mass are numerically identical but conceptually different. Molecular weight is the mass of one molecule in atomic mass units (amu or Da). Molar mass is the mass of one mole in grams. The numbers are the same: water has a molecular weight of 18.015 amu and a molar mass of 18.015 g/mol.
→ For solutions, use molar mass to calculate molarity. Molarity = moles of solute ÷ liters of solution. To make a 1M NaCl solution: NaCl molar mass = 58.44 g/mol, so dissolve 58.44g in enough water to make 1 liter. Use our Dilution Calculator for dilution calculations.
See also: Concentration Calculator · Dilution Calculator · Ideal Gas Law Calculator · pH Calculator