Skip to main content
🔬 Advanced

Molar Mass Calculator – Molecular Weight from Formula

Calculate the molar mass of any chemical compound by entering its molecular formula. Use this free science calculator for accurate results. No signup.

★★★★★ 4.8/5 · 📊 0 calculations · 🔒 Private & free

What Is Molar Mass?

Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). One mole contains exactly 6.02214076 × 10²³ elementary entities (atoms, molecules, ions, or formula units) — a quantity known as Avogadro's number (N_A). The molar mass numerically equals the relative molecular mass (or formula mass) but carries the unit g/mol.

The molar mass of a compound is calculated by summing the atomic masses of all atoms in its molecular or empirical formula. Each element's standard atomic weight is found on the periodic table (based on the natural isotopic distribution). For example, water (H₂O):

M(H₂O) = 2 × M(H) + 1 × M(O) = 2 × 1.008 + 15.999 = 18.015 g/mol

This means that exactly 18.015 grams of pure water contains one mole — that is, 6.022 × 10²³ molecules — of H₂O. The concept bridges the macroscopic world (grams you can weigh on a balance) and the microscopic world (individual atoms and molecules you cannot see).

The unit dalton (Da) or unified atomic mass unit (u) is used interchangeably at the molecular scale: 1 Da = 1 g/mol for practical purposes. A single water molecule has a mass of 18.015 Da; one mole of water molecules has a mass of 18.015 g.

How to Calculate Molar Mass Step by Step

Follow these steps to calculate the molar mass of any chemical compound:

  1. Write the chemical formula. Identify each element and its subscript (number of atoms). If no subscript is written, it is 1. Examples: NaCl, C₆H₁₂O₆, Ca(OH)₂, Al₂(SO₄)₃.
  2. Look up atomic masses from the periodic table (values below rounded to 3 decimal places for common elements).
  3. Multiply each element's atomic mass by its subscript.
  4. Handle parentheses: Multiply the subscripts inside by the subscript outside. Ca(OH)₂ = 1 Ca, 2 O, 2 H.
  5. Sum all contributions to get the total molar mass in g/mol.

Worked Examples

CompoundFormulaCalculationMolar Mass (g/mol)
WaterH₂O2(1.008) + 15.99918.015
Sodium chlorideNaCl22.990 + 35.45358.443
GlucoseC₆H₁₂O₆6(12.011) + 12(1.008) + 6(15.999)180.156
Sulfuric acidH₂SO₄2(1.008) + 32.065 + 4(15.999)98.079
Calcium hydroxideCa(OH)₂40.078 + 2(15.999 + 1.008)74.092
Aluminum sulfateAl₂(SO₄)₃2(26.982) + 3(32.065 + 4×15.999)342.151
EthanolC₂H₅OH2(12.011) + 6(1.008) + 15.99946.069
CaffeineC₈H₁₀N₄O₂8(12.011) + 10(1.008) + 4(14.007) + 2(15.999)194.194

Standard Atomic Masses of Common Elements

The following table lists standard atomic weights (2021 IUPAC values) for the most frequently encountered elements in chemistry. These are weighted averages based on the natural abundance of each element's stable isotopes:

ElementSymbolAtomic NumberAtomic Mass (g/mol)
HydrogenH11.008
CarbonC612.011
NitrogenN714.007
OxygenO815.999
FluorineF918.998
SodiumNa1122.990
MagnesiumMg1224.305
AluminumAl1326.982
SiliconSi1428.086
PhosphorusP1530.974
SulfurS1632.065
ChlorineCl1735.453
PotassiumK1939.098
CalciumCa2040.078
IronFe2655.845
CopperCu2963.546
ZincZn3065.380
BromineBr3579.904
SilverAg47107.868
IodineI53126.904
GoldAu79196.967

Standard atomic weights have uncertainties (typically in the last digit) because they depend on isotopic abundances, which vary slightly by source. For ultraprecise work, IUPAC publishes interval notations for some elements (e.g., hydrogen: [1.00784, 1.00811]).

The Mole Concept and Avogadro's Number

The mole is one of the seven SI base units and serves as the bridge between the atomic scale and the laboratory scale. As redefined in 2019 (SI revision), one mole contains exactly 6.02214076 × 10²³ elementary entities. This number — Avogadro's constant (N_A) — is a defined constant, no longer tied to a specific measurement of carbon-12.

The key relationships involving moles:

For example, 100 g of glucose (C₆H₁₂O₆, M = 180.156 g/mol) is: n = 100/180.156 = 0.555 mol, containing 0.555 × 6.022 × 10²³ = 3.34 × 10²³ molecules. Each glucose molecule contains 24 atoms, so 100 g of glucose contains about 8.0 × 10²⁴ individual atoms.

Stoichiometry: Using Molar Mass in Chemical Reactions

Molar mass is the essential conversion factor in stoichiometry — the quantitative study of chemical reactions. A balanced chemical equation tells you the mole ratios of reactants and products. Molar mass converts between grams and moles.

Example: Combustion of methane: CH₄ + 2O₂ → CO₂ + 2H₂O

If you burn 16.04 g of methane (1 mol CH₄):

Mass is conserved: 16.04 + 64.00 = 80.04 g reactants = 44.01 + 36.03 = 80.04 g products.

Limiting Reagent and Percent Yield

In practice, one reactant is usually in excess. The limiting reagent is consumed first and determines the maximum product. To find it: convert each reactant's mass to moles, divide by its stoichiometric coefficient, and the smallest result identifies the limiting reagent.

Percent yield = (actual yield / theoretical yield) × 100%. If theory predicts 44.01 g CO₂ but you collect 40.5 g, percent yield = (40.5/44.01) × 100% = 92.0%. Yields below 100% result from side reactions, incomplete reactions, or mechanical losses during purification.

Solution Concentration and Dilution Formulas

Preparing solutions of known concentration is a daily task in chemistry labs. Molar mass is used to calculate how much solute to weigh:

Molarity (M): M = n / V = m / (M_w × V), where n = moles of solute, V = volume of solution in liters, m = mass of solute (g), M_w = molar mass (g/mol).

To prepare 500 mL of 0.1 M NaCl: mass = M × M_w × V = 0.1 × 58.443 × 0.5 = 2.922 g of NaCl dissolved in water and diluted to 500 mL total volume.

Concentration UnitFormulaCommon Use
Molarity (M)mol solute / L solutionGeneral chemistry, titrations
Molality (m)mol solute / kg solventColligative properties, thermodynamics
Mass percent (%w/w)(mass solute / mass solution) × 100Commercial products, pharmacy
Parts per million (ppm)mg solute / kg solutionEnvironmental science, water quality
Normality (N)equivalents / L solutionAcid-base titrations (older convention)

Dilution formula: M₁V₁ = M₂V₂. To dilute 50 mL of 6 M HCl to 1 M: V₂ = (6 × 50)/1 = 300 mL total. Add 250 mL of water to the 50 mL of acid (always add acid to water, never water to concentrated acid — the exothermic reaction can cause violent boiling).

Molar Mass in Everyday Life and Industry

While molar mass may seem like a purely academic concept, it is used constantly across many fields:

Pharmaceuticals: Drug dosages are calculated based on molar mass. Aspirin (C₉H₈O₄, M = 180.157 g/mol) tablets contain a specific mass of the active ingredient. A 325 mg tablet contains 325/180.157 = 1.80 mmol of aspirin. Understanding molar quantities is essential for calculating therapeutic doses, drug interactions, and pharmacokinetics.

Nutrition: The caloric content of foods is calculated from the molar masses of macronutrients. Glucose (C₆H₁₂O₆, M = 180.156 g/mol) yields 2,803 kJ/mol upon complete oxidation. Per gram: 2,803/180.156 = 15.56 kJ/g ≈ 3.72 kcal/g — close to the standard 4 kcal/g value for carbohydrates.

Environmental Science: CO₂ emissions are tracked by mass. One mole of carbon (12.011 g) produces one mole of CO₂ (44.010 g). Burning 1 kg of carbon produces 44.010/12.011 = 3.664 kg of CO₂. Burning one gallon of gasoline (≈2.35 kg of carbon) releases approximately 8.6 kg of CO₂.

Materials Engineering: Polymer molecular weights are expressed as number-average (Mn) and weight-average (Mw) molar masses. Polyethylene can range from ~28 g/mol (monomer, C₂H₄) to several million g/mol for ultra-high-molecular-weight polyethylene (UHMWPE) used in joint replacements and bulletproof vests.

Cooking: Baking soda (NaHCO₃, M = 84.007 g/mol) reacts with vinegar (acetic acid, CH₃COOH, M = 60.052 g/mol) to produce CO₂ gas that leavens baked goods. The stoichiometric ratio determines how much baking soda to use.

Water Treatment: Municipal water plants add precise amounts of chemicals measured using molar mass. Chlorine gas (Cl₂, M = 70.906 g/mol) at typical dosages of 1–3 mg/L requires careful stoichiometric calculation. Fluoridation uses sodium fluoride (NaF, M = 41.988 g/mol) at 0.7 ppm — about 0.7 mg per liter. Calculating these concentrations from bulk chemical supplies relies entirely on molar mass conversions.

Forensic Science: Mass spectrometry identifies substances by their molar mass with extreme precision. A mass spectrometer ionizes molecules and measures their mass-to-charge ratio (m/z). The resulting spectrum is a molecular fingerprint — each compound has a unique fragmentation pattern determined by its molar mass and structure. Drug testing, toxicology, and explosive residue analysis all depend on accurate molar mass identification.

Frequently Asked Questions

What is the molar mass of water?

Water (H₂O) has a molar mass of 18.015 g/mol: 2 × hydrogen (1.008 g/mol) + 1 × oxygen (15.999 g/mol) = 18.015 g/mol. This means 18.015 grams of water contains exactly one mole (6.022 × 10²³) of water molecules. One mole of water occupies approximately 18.015 mL at room temperature (since water's density is ≈1.00 g/mL) — roughly one tablespoon plus a teaspoon.

How is molar mass different from molecular weight?

They are numerically identical but conceptually different. Molecular weight (relative molecular mass, Mr) is a dimensionless ratio comparing a molecule's mass to 1/12 the mass of a carbon-12 atom. Molar mass has units of g/mol and represents the mass of one mole of that substance. For water, Mr = 18.015 (dimensionless) and M = 18.015 g/mol. In practice, the terms are used interchangeably, but molar mass is preferred in modern IUPAC nomenclature.

Can I calculate molar mass for ionic compounds?

Yes — the calculation is identical. For sodium chloride (NaCl): Na (22.990) + Cl (35.453) = 58.443 g/mol. Technically, ionic compounds don't have discrete molecules, so it is called the formula mass rather than molecular mass. The formula unit (the simplest whole-number ratio of ions) is used instead of a molecule. For calcium chloride (CaCl₂): 40.078 + 2(35.453) = 110.984 g/mol.

What is the difference between molar mass and atomic mass?

Atomic mass is the mass of a single atom, typically expressed in daltons (Da) or unified atomic mass units (u). Molar mass is the mass of one mole (6.022 × 10²³) of atoms or molecules, expressed in g/mol. Numerically, they are equal: carbon has an atomic mass of 12.011 Da and a molar mass of 12.011 g/mol. The difference is scale: atomic mass describes one particle; molar mass describes Avogadro's number of particles.

How do I handle hydrated compounds?

Hydrated compounds include water of crystallization in their formula. For copper(II) sulfate pentahydrate (CuSO₄·5H₂O): M = M(CuSO₄) + 5 × M(H₂O) = (63.546 + 32.065 + 4 × 15.999) + 5 × 18.015 = 159.609 + 90.075 = 249.685 g/mol. Always include the water molecules in the molar mass calculation. Heating the hydrate drives off the water, leaving the anhydrous salt (159.609 g/mol for anhydrous CuSO₄).

What is Avogadro's number and why is it important?

Avogadro's number (N_A = 6.02214076 × 10²³ mol⁻¹) is the number of elementary entities in one mole. Since 2019, it is a defined exact constant (not measured). It bridges the atomic and macroscopic worlds: 12.011 g of carbon contains exactly N_A carbon atoms. Without Avogadro's number, we could not convert between the mass we measure on a balance and the number of atoms or molecules involved in a reaction.

How do I convert grams to moles?

Use the formula: n = m / M, where n is moles, m is mass in grams, and M is molar mass in g/mol. Example: How many moles in 50 g of NaOH (M = 39.997 g/mol)? n = 50 / 39.997 = 1.250 mol. To convert moles back to grams: m = n × M. To find the number of molecules: N = n × 6.022 × 10²³.

What is empirical formula vs. molecular formula?

The empirical formula is the simplest whole-number ratio of atoms in a compound. The molecular formula is the actual number of atoms per molecule. Glucose has molecular formula C₆H₁₂O₆ and empirical formula CH₂O (ratio 1:2:1). The molecular formula is always a whole-number multiple of the empirical formula: (CH₂O)₆ = C₆H₁₂O₆. To determine which multiple applies, divide the actual molar mass by the empirical formula mass: 180.156 / 30.026 = 6.

Why do different isotopes have different masses?

Isotopes of an element have the same number of protons but different numbers of neutrons, giving them different masses. Carbon-12 (6p + 6n) has a mass of exactly 12.000 Da; Carbon-13 (6p + 7n) has a mass of 13.003 Da; Carbon-14 (6p + 8n) has a mass of 14.003 Da. The standard atomic weight of carbon (12.011) is a weighted average based on natural abundance: 98.9% C-12 and 1.1% C-13 (C-14 is negligible). This averaging is why atomic masses are not whole numbers.

How accurate is this molar mass calculator?

This calculator uses standard IUPAC atomic weights rounded to three decimal places, which is sufficient for most academic and laboratory work (accuracy to ±0.01 g/mol for most compounds). For ultraprecise analytical chemistry (e.g., mass spectrometry calibration), use the full IUPAC 2021 atomic weight values with all significant figures. The calculator handles standard formulas like H2O, NaCl, and C6H12O6 but does not parse parenthetical groups like Ca(OH)2 — enter those as CaO2H2 instead.

},{"@type":“Question”,“name”:“How is molar mass different from molecular weight?”,“acceptedAnswer”:{"@type":“Answer”,“text”:“Numerically identical. Molecular weight is dimensionless (relative to C-12); molar mass has units of g/mol. In practice, interchangeable.”}},{"@type":“Question”,“name”:“Can I calculate molar mass for ionic compounds?”,“acceptedAnswer”:{"@type":“Answer”,“text”:“Yes, the calculation is identical. For NaCl: 22.990 + 35.453 = 58.443 g/mol. Technically called formula mass for ionic compounds.”}},{"@type":“Question”,“name”:“What is the difference between molar mass and atomic mass?”,“acceptedAnswer”:{"@type":“Answer”,“text”:“Atomic mass is per single atom (in Da). Molar mass is per mole of atoms/molecules (in g/mol). Numerically equal; different scales.”}},{"@type":“Question”,“name”:“How do I handle hydrated compounds?”,“acceptedAnswer”:{"@type":“Answer”,“text”:“Include water of crystallization. CuSO₄·5H₂O = 159.609 + 5(18.015) = 249.685 g/mol.”}},{"@type":“Question”,“name”:“What is Avogadro’s number and why is it important?”,“acceptedAnswer”:{"@type":“Answer”,“text”:“6.02214076 × 10²³ mol⁻¹ — the number of entities in one mole. Bridges atomic and macroscopic scales.”}},{"@type":“Question”,“name”:“How do I convert grams to moles?”,“acceptedAnswer”:{"@type":“Answer”,“text”:“n = m / M. Example: 50 g NaOH (M = 39.997) → 50/39.997 = 1.250 mol.”}},{"@type":“Question”,“name”:“What is empirical formula vs. molecular formula?”,“acceptedAnswer”:{"@type":“Answer”,“text”:“Empirical formula is the simplest ratio (CH₂O for glucose). Molecular formula is the actual count (C₆H₁₂O₆). Molecular = n × empirical.”}},{"@type":“Question”,“name”:“Why do different isotopes have different masses?”,“acceptedAnswer”:{"@type":“Answer”,“text”:“Same protons, different neutrons. C-12 = 12.000 Da, C-13 = 13.003 Da. Standard atomic weight is a weighted average of natural isotopic abundance.”}},{"@type":“Question”,“name”:“How accurate is this molar mass calculator?”,“acceptedAnswer”:{"@type":“Answer”,“text”:“Uses IUPAC atomic weights rounded to 3 decimal places. Accurate to ±0.01 g/mol for most compounds. Sufficient for academic and lab work.”}}]}