The molar mass ($M$) of a substance is the mass of one mole of its formula units, expressed in grams per mole (g/mol). It is the single most-used numerical bridge in quantitative chemistry, linking the macroscopic world of laboratory balances to the microscopic world of atoms and molecules.

This calculator parses any well-formed chemical formula — including hydrates, polyatomic ions, and nested groups — and returns the total molar mass, the percent composition by element, and bidirectional conversions between sample mass and amount of substance. It eliminates the manual lookup of atomic weights and the arithmetic errors that propagate through stoichiometric problems.

Required Input Parameters

To obtain a complete analysis from the Calculation Results, the following data must be provided in the Compound Specification area:

  • Chemical Formula — Standard Hill or condensed notation. Element symbols are case-sensitive ($\text{Co}$ = cobalt; $\text{CO}$ = carbon monoxide).
  • Subscripts — Entered as plain integers immediately following the element or group (e.g., $\text{H2SO4}$).
  • Polyatomic Groups — Enclosed in parentheses (), square brackets [], or braces {} followed by a multiplier (e.g., $\text{Mg(OH)2}$, $\text{K4[Fe(CN)6]}$).
  • Hydrate Notation — An asterisk * or dot . separates the anhydrous compound from its water of crystallization (e.g., $\text{CuSO4*5H2O}$).
  • Sample Mass — In grams ($\text{g}$); used to derive the corresponding amount of substance.
  • Amount of Substance — In moles ($\text{mol}$); used to derive the corresponding mass.
  • Output Precision — The number of decimal places applied to all reported quantities (2–5).

Theoretical Foundation & Formulas

The Mole and the Avogadro Constant

The mole is the SI base unit for amount of substance. Following the 2019 redefinition of the SI, one mole contains exactly $N_A = 6.022,140,76 \times 10^{23}$ elementary entities. The Avogadro constant is now a defined, exact quantity rather than an experimentally determined value.

A direct consequence is that the molar mass of carbon-12 is no longer exactly $12\ \text{g/mol}$; it is now an experimentally measured quantity with a relative uncertainty on the order of $10^{-10}$. For all practical chemical calculations, however, the previous numerical convention $M(^{12}\text{C}) = 12\ \text{g/mol}$ remains valid to well beyond standard laboratory precision.

Definition of Molar Mass

For a chemical species with formula $\text{A}{a}\text{B}{b}\text{C}_{c}\dots$, the molar mass is the sum of the standard atomic weights ($A_r$) of each constituent element, weighted by its stoichiometric coefficient:

$$M = \sum_{i=1}^{n} n_i \cdot A_{r,i}$$

where $n_i$ is the number of atoms of element $i$ in one formula unit and $A_{r,i}$ is the standard atomic weight reported by the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW).

Mass Percent Composition

The mass fraction of element $i$ in the compound, expressed as a percentage, is:

$$\omega_i = \frac{n_i \cdot A_{r,i}}{M} \times 100\%$$

The sum of all $%w_i$ values must equal $100%$ (within rounding). This quantity is essential for gravimetric analysis, purity verification, and the determination of empirical formulas from combustion data.

Mass–Mole Conversion

The defining relationship between mass ($m$), amount of substance ($n$), and molar mass ($M$) is linear:

$$n = \frac{m}{M} \qquad \text{and} \qquad m = n \cdot M$$

Editing either field in the Mass & Moles Converter automatically recomputes the other through this relation, with the most recently modified value treated as the independent variable.

Mass of a Single Particle

The absolute mass of one formula unit (molecule, ion pair, or atom group) is obtained by dividing the molar mass by the Avogadro constant:

$$m_{\text{particle}} = \frac{M}{N_A}$$

The result is reported in grams, typically on the order of $10^{-22}$ to $10^{-25}\ \text{g}$ for ordinary molecules.

Molar Volume of an Ideal Gas

For gaseous species at Standard Temperature and Pressure (STP, $0\ ^\circ\text{C}$ and $1\ \text{atm}$), the volume occupied by $n$ moles is given by the ideal gas equation rearranged as:

$$V = n \cdot V_m = n \cdot 22.414\ \text{L/mol}$$

This calculator employs the legacy STP definition ($1\ \text{atm}$), which yields $V_m = 22.414\ \text{L/mol}$. Note that IUPAC's 1982 redefinition uses $100\ \text{kPa}$, producing $V_m = 22.711\ \text{L/mol}$ — a distinction that matters in precise gas-phase work.

Technical Specifications / Reference Data

The calculator's atomic-weight database is aligned with the CIAAW 2021 Standard Atomic Weights (single-value conventional form). Selected values for the most frequently used elements are listed below:

ElementSymbolAtomic Number$A_r$ (g/mol)Common Use
HydrogenH11.008Acids, organics, water
CarbonC612.011Organic chemistry, fuels
NitrogenN714.007Fertilizers, proteins
OxygenO815.999Oxides, water, biology
SodiumNa1122.990Salts, biochemistry
MagnesiumMg1224.305Chlorophyll, alloys
AluminiumAl1326.982Structural alloys
PhosphorusP1530.974DNA, fertilizers
SulfurS1632.06Sulfuric acid, vulcanization
ChlorineCl1735.45Salts, chlorides, PVC
PotassiumK1939.098Electrolytes, fertilizers
CalciumCa2040.078Bone, limestone, cement
IronFe2655.845Steel, hemoglobin
CopperCu2963.546Conductors, sulfates
ZincZn3065.38Galvanization, batteries
SilverAg47107.87Photographic salts, jewelry
IodineI53126.90Iodides, antiseptics
GoldAu79196.97Coinage, electronics
MercuryHg80200.59Thermometers, amalgams
LeadPb82207.2Batteries, shielding

For elements with no stable isotope (Tc, Pm, Po, At, Rn, Fr, Ra, Ac, and the transuranics), the calculator uses the mass number of the longest-lived isotope as a conventional reference, in line with IUPAC recommendations.

Worked Reference Compounds

CompoundFormula$M$ (g/mol)Notes
Water$\text{H}_2\text{O}$18.015Universal solvent
Carbon dioxide$\text{CO}_2$44.009Combustion product
Sodium chloride$\text{NaCl}$58.44Common table salt
Glucose$\text{C}6\text{H}{12}\text{O}_6$180.156Primary metabolic sugar
Sulfuric acid$\text{H}_2\text{SO}_4$98.078Strong mineral acid
Calcium carbonate$\text{CaCO}_3$100.086Limestone, marble
Copper(II) sulfate pentahydrate$\text{CuSO}_4{\cdot}5\text{H}_2\text{O}$249.685Common laboratory hydrate
Ammonium sulfate$(\text{NH}_4)_2\text{SO}_4$132.134Nitrogen fertilizer
Potassium ferrocyanide$\text{K}_4[\text{Fe(CN)}_6]$368.346Analytical reagent

Engineering Analysis & Real-World Application

Stoichiometric Scaling and Reaction Yields

Molar mass is the conversion factor that transforms a balanced chemical equation — written in moles — into a practical recipe written in grams. Consider the Haber–Bosch synthesis of ammonia:

$$\text{N}_2 + 3\text{H}_2 \rightarrow 2\text{NH}_3$$

Producing $1\ \text{kg}$ of $\text{NH}_3$ ($M = 17.031\ \text{g/mol}$) requires $58.72\ \text{mol}$ of product, hence $29.36\ \text{mol}$ of $\text{N}_2$ ($822.4\ \text{g}$) and $88.08\ \text{mol}$ of $\text{H}_2$ ($177.6\ \text{g}$). Errors in $M$ propagate linearly into the predicted reagent masses, so a $1%$ error in molar mass yields a $1%$ error in the theoretical yield.

Solution Preparation and Molar Concentration

To prepare a solution of defined molarity ($c$, mol/L) from a solid solute, the required mass is:

$$m = c \cdot V \cdot M$$

For a $0.250\ \text{L batch of } 0.100\ \text{M CuSO}_4\text{, the dry pentahydrate } (M = 249.685\ \text{g/mol})$ must be weighed, not the anhydrous salt. This is one of the most common sources of systematic error in undergraduate laboratory work: failing to include the water of crystallization inflates the apparent concentration by a factor of $M_{\text{hydrate}} / M_{\text{anhydrous}}$ — roughly 1.56 in the case of $\text{CuSO}_4\cdot 5\text{H}_2\text{O}$.

Empirical Formula Determination

Percent composition is the inverse problem of molar-mass calculation. Given experimental mass fractions from combustion analysis or ICP-MS, dividing each $%w_i$ by $A_{r,i}$ and normalizing to the smallest quotient yields the empirical formula. The percent-composition output of this calculator allows direct verification of a hypothesized molecular structure against analytical data.

Gas-Phase Stoichiometry

The molar volume relationship is indispensable for gas-evolution reactions. For example, the decomposition of $1.000\ \text{g}$ of $\text{CaCO}_3$ ($M = 100.086\ \text{g/mol}$) liberates $9.991\ \text{mmol}$ of $\text{CO}_2$, occupying $0.2240\ \text{L}$ at STP. This calculation underpins everything from limestone calcination in cement kilns to airbag chemistry.

Pharmaceutical Dosing

In medicinal chemistry, molar mass governs the conversion between the active pharmaceutical ingredient (API) and its salt form. A dose specified as "$10\ \text{mg}$ free base" of an amine drug delivered as the hydrochloride salt requires recalculation through the molar-mass ratio $M_{\text{HCl salt}} / M_{\text{free base}}$ to determine the actual mass of the dispensed compound.

Frequently Asked Questions

Why does my molar mass differ slightly from values in older textbooks?

Standard atomic weights are revised periodically by the IUPAC CIAAW as new isotope-ratio measurements become available. The most recent comprehensive revision is the Standard Atomic Weights 2021 technical report, which adjusted values for argon, hafnium, iridium, lead, and ytterbium, with further refinements for gadolinium, lutetium, and zirconium published in 2024.

For elements such as argon and lead, the natural isotopic variation across terrestrial sources now exceeds analytical measurement uncertainty. IUPAC publishes these as interval values; this calculator uses the conventional single-point value recommended for general use. Differences from older sources rarely exceed the third decimal place and are negligible in routine work.

How does the calculator handle nested groups and water of crystallization?

The parser implements a recursive-descent algorithm with a stack-based scope tracker. When an opening delimiter — (, [, or { — is encountered, a new compositional context is pushed onto the stack. The matching closing delimiter triggers a pop, and any trailing numeric multiplier is applied to every element accumulated within that scope before merging it into the parent context.

Hydrates use a separate top-level mechanism: the asterisk * or period . splits the formula into independent fragments that are parsed individually and then summed. A leading numeric coefficient on a fragment (such as the 5 in 5H2O) multiplies that fragment as a whole. This approach correctly handles deeply nested expressions like $\text{KAl(SO}_4)_2 \cdot 12\text{H}_2\text{O}$ (potassium alum, $M = 474.388\ \text{g/mol}$).

Why are the gas volume and "mass of one particle" outputs sensitive to my choice of formula?

Both quantities are directly proportional to the molar mass of the species defined by the input formula. Because gases at STP all occupy approximately $22.414\ \text{L/mol}$, the volume reported reflects only the amount of substance you specified, not the chemical identity. The "mass of one particle" output, in contrast, is purely a property of $M$ itself, computed as $M/N_A$.

These two outputs are most useful for sanity-checking calculations involving gas-evolution reactions, for estimating the size of laboratory apparatus required to contain a gaseous product, and for converting between molar quantities and the absolute particle counts relevant in mass spectrometry, single-molecule kinetics, and ultratrace analysis.

Professional Conclusion

Manual molar-mass computation is conceptually trivial but operationally error-prone: the work involves dozens of lookups, multiplications, and additions for any compound of moderate complexity, with parenthetical groups and hydrates compounding the opportunities for arithmetic slips. A miscounted hydrogen in a steroid skeleton or a dropped water molecule in a transition-metal complex can shift downstream stoichiometry by several percent — an unacceptable margin in synthetic, analytical, or pharmaceutical contexts.

This calculator removes that failure mode entirely. By coupling a robust formula parser to the current IUPAC standard atomic weights and rendering the percent composition, mass–mole conversion, particle mass, and gas-phase volume in a single coherent Calculation Results view, it delivers in milliseconds the data that would otherwise require several minutes of careful arithmetic. The result is faster bench work, cleaner notebooks, and — most importantly — quantitatively sound chemistry.