Molar Mass Calculator

Find the molar mass of a chemical formula, the moles and particles in a sample, and the mass share of each element.

Case-sensitive symbols with parentheses, e.g. H2SO4, Ca(OH)2, C6H12O6.

Molar mass (g/mol)
—
Atoms per formula unit
—
Sample amount (mol)
—
Particles in the sample (formula units)
—
Mass share by element
—

Formula mode uses IUPAC abridged standard atomic weights (conventional values for elements with a range); elements without a standard atomic weight are rejected. Use the rows mode for your own or isotopic masses.

Calculation and assumptions

M = Σ Aᵣ(i)·Nᵢ; n = m/M; N = n·Nₐ with Nₐ = 6.02214076·10²³ mol⁻¹; share(i) = Aᵣ(i)·Nᵢ/M.

In formula mode, enter symbols with correct capitals and optional parentheses (up to 200 characters, nesting 8). In rows mode, enter each element once as symbol, atomic mass and atom count. The sample mass is in grams. Hydrate dots and charges are not parsed; write CuSO4(H2O)5 instead of CuSO4·5H2O.

Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Frequently asked questions

How is the result calculated?

M = Σ Aᵣ(i)·Nᵢ; n = m/M; N = n·Nₐ with Nₐ = 6.02214076·10²³ mol⁻¹; share(i) = Aᵣ(i)·Nᵢ/M.

What assumptions apply?

In formula mode, enter symbols with correct capitals and optional parentheses (up to 200 characters, nesting 8). In rows mode, enter each element once as symbol, atomic mass and atom count. The sample mass is in grams. Hydrate dots and charges are not parsed; write CuSO4(H2O)5 instead of CuSO4·5H2O.

How precise are the results?

Results show up to ten significant digits. Display precision does not improve the accuracy of the measurements or model. Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

How we verified this calculator

The calculator is checked against 2 reference cases computed independently of its code. Last passed: .

# Inputs Expected result
1
Input = Own atomic masses (rows)
Chemical formula = bad
Molar mass (g/mol): 18.015
Atoms per formula unit: 3
Sample amount (mol): 1
2
Input = Own atomic masses (rows)
Rows: element atomic-mass atom-count; semicolon or newline = H 2.014 2 O 15.995 1
Sample mass (g) = 20
Molar mass (g/mol): 20.023
Atoms per formula unit: 3

How we test our calculators →

Also try:

Back to category →