How this calculation works
Expand each formula group and hydrate component before counting the atoms of each element. Multiply those counts by CIAAW’s 2024 abridged standard atomic weights and sum the contributions. The numeric relative formula mass is dimensionless, while molar mass is reported in grams per mole. Sample mass divided by molar mass gives the entered sample’s amount in moles.
Molar mass = Σ (expanded count of each element × its abridged standard atomic weight)A worked example
For H2O, two hydrogen atoms contribute 2×1.0080 = 2.016 and one oxygen contributes 15.999. Molar mass is 18.015 g/mol. An assumed pure 18.015 g sample therefore contains 1 mole of water formula units.
Good to know
Abridged standard values reflect ordinary isotopic composition and published rounding. They are not monoisotopic exact masses and no uncertainty is propagated. Up to 500 formula characters, 8 nested groups and 1–9999 per explicit multiplier. Charges, isotope labels and radioactive elements without standard atomic weights are rejected. Parsing a formula does not establish a compound’s existence or stability.
Reference: CIAAW: Abridged Standard Atomic Weights 2024 (opens in a new tab) ↗
A formula counts atoms before it weighs them
A chemical formula is a compact counting notation. In Ca(OH)2, the outer two applies to both oxygen and hydrogen inside the parentheses. In K4[Fe(CN)6], the bracket contains one iron atom and six carbon–nitrogen pairs. Expanding the groups first prevents a misplaced multiplier from silently changing the composition.
The molarity calculator relates an amount in moles to a solution volume. This molar-mass page supplies a different bridge: from a written formula and sample mass to amount in moles. A solution calculation may require both steps, but solution volume and pure compound mass are separate measurements.
Hydrate water contributes to formula mass
CuSO4·5H2O contains one copper, one sulfur, nine oxygen and ten hydrogen atoms per written formula unit. The five multiplies the entire water component. Using the abridged values here gives 249.677 g/mol. Ignoring the hydrate water would instead calculate anhydrous CuSO4, a different specified composition.
Case matters: Co is cobalt, while CO is one carbon plus one oxygen. Parentheses and square brackets are grouping symbols here; they are not isotope labels. Decimal subscripts, charge suffixes and isotope-specific formulas need conventions beyond the standard-atomic-weight model and are rejected rather than guessed.
Standard atomic weight is not an exact isotope mass
The CIAAW abridged table describes ordinary materials using rounded standard atomic weights and notes natural variation. A high-precision mass-spectrometry calculation often needs specified isotopes and monoisotopic masses instead. Extra decimal places in a sum cannot remove the uncertainty or rounding already present in the source values.
For an ionic solid, “relative formula mass” is often a more suitable name than “molecular weight,” because a lattice need not consist of discrete molecules. The numerical molar mass still follows the supplied formula-unit composition. The density calculator connects sample mass with physical volume; that relationship is independent of counting the atoms in a formula.
A few questions, answered
Does a valid formula mean the compound exists?
No. The parser checks supported notation and calculates its composition; it does not establish chemical stability or existence.
Can I enter a radioactive isotope?
Not as an isotope-specific mass calculation. Elements without an abridged standard atomic weight are rejected.
Why are the molar mass and relative formula mass numerically equal?
With the usual gram-per-mole convention their numerical values correspond, but relative formula mass is dimensionless while molar mass has units.