Molar Mass Calculator
Molar mass, % composition and more from any formula, with IUPAC 2024 atomic weights.
Composition by element
Mass spectrometry
Degree of unsaturation
How it was worked out
About the Molar Mass Calculator
Type a chemical formula — or a common name such as caffeine or baking soda — and get its molar mass in g/mol at once, with every element’s share: atoms, atomic weight, mass and mass percent. The calculator reads brackets of every kind (Ca₃(PO₄)₂, K₄[Fe(CN)₆]), hydrates (CuSO₄·5H₂O, written with ·, * or a full stop), charges (SO₄²⁻ as SO4^2-, Fe³⁺ as Fe3+), isotopes (D₂O, ¹³CO₂ as ^13CO2) and decimal subscripts (Fe0.95O), and shows how it read your input so nothing is guessed silently.
Atomic weights are the IUPAC CIAAW Standard Atomic Weights 2024, and isotope masses come from NIST. Next to the molar mass you also get the Hill formula, the mass of one formula unit, the water of crystallisation of a hydrate, the monoisotopic and nominal mass used in mass spectrometry (with m/z for ions), and the degree of unsaturation of organic formulas — each with the working shown.
How to use it
- Type the formula, for example
CuSO4·5H2O,Ca3(PO4)2orC6H12O6, or a name such asaspirin. Symbols are case-sensitive:Cois cobalt,COis carbon monoxide. - Check the Read as line: it shows the formula with real subscripts and superscripts, so you can see how hydrates, charges and isotopes were understood.
- Read the molar mass in the dark box and the breakdown table below it; choose how many decimal places to show.
- Copy the result, or download the composition table as CSV for a spreadsheet or lab report.
- Open How it was worked out to see each element’s count multiplied by its atomic weight and the sum.
Examples
H2O
18.015 g/mol — H 11.19 %, O 88.81 %
2 × 1.0080 + 15.999.
C6H12O6
180.156 g/mol — C 40.00 %, H 6.71 %, O 53.28 %
The composition of CH₂O, glucose’s empirical formula — the answer to the 40.0 % C, 6.71 % H, 53.28 % O exercise in OpenStax Chemistry 2e §3.2.
CuSO4·5H2O
249.677 g/mol, of which water is 36.08 %
Without the water (CuSO₄) the molar mass is 159.602 g/mol. Hill formula CuH₁₀O₉S.
Ca3(PO4)2
310.174 g/mol — Ca 38.76 %, P 19.97 %, O 41.26 %
caffeine
C₈H₁₀N₄O₂: 194.194 g/mol; monoisotopic mass 194.080 376 Da; degree of unsaturation 6
D2O
20.027 g/mol (heavy water), using the NIST mass of deuterium, 2.014 101 778
SO4^2-
96.056 g/mol, charge 2−
As usual, the two extra electrons (0.0011 g/mol) are not added.
Common uses
- Chemistry homework: molar masses for mole and stoichiometry problems, and percent composition.
- Lab work: the molar mass of the exact hydrate on the reagent bottle, before weighing out a solution.
- Checking a molecular formula from elemental analysis against its mass percentages.
- Mass spectrometry: monoisotopic and nominal mass, and m/z of an ion.
- Organic chemistry: the degree of unsaturation (rings plus π bonds) from a molecular formula.
How molar mass is calculated
The molar mass M of a compound is the sum, over its elements, of the number of atoms in the formula times the element’s atomic weight: M = Σ nᵢ × Aᵣ,ᵢ g/mol. For CuSO₄·5H₂O: 1 × 63.546 (Cu) + 1 × 32.06 (S) + 9 × 15.999 (O) + 10 × 1.0080 (H) = 249.677 g/mol. Each element’s mass percent is its share of that sum, and its atom percent is its share of the atoms.
Molar mass (g/mol), relative molecular mass Mr (no unit) and the molecular mass of one molecule in daltons are the same number. For an ionic compound such as NaCl there are no molecules, and the same sum is called the formula mass (OpenStax Chemistry 2e §3.1). Dividing M by the Avogadro constant, 6.022 140 76 × 10²³ mol⁻¹ (exact), gives the mass of one formula unit in grams.
Which atomic weights are used
- Elements with one standard atomic weight use it in full, for example Na 22.989 769 28(2) and Fe 55.845(2).
- Fourteen elements — H, Li, B, C, N, O, Mg, Si, S, Cl, Ar, Br, Tl and Pb — are given by CIAAW as an interval because their isotopic mix varies in nature (carbon: [12.0096, 12.0116]). For these the CIAAW abridged value is used: H 1.0080, C 12.011, N 14.007, O 15.999, S 32.06, Cl 35.45 and so on.
- Radioactive elements without a standard atomic weight (technetium, promethium, polonium to actinium, and neptunium onwards) use the NIST mass of their longest-lived isotope as listed by CIAAW, such as ⁹⁷Tc; label another isotope with
^99Tcif you need it. - Isotope labels (D, T,
^13C,¹⁸O,[15N]) use NIST relative atomic masses.
The ± under the result adds up every atom’s CIAAW uncertainty: the molar mass of any normal sample lies within it, which tells you how many decimals are meaningful (58.44 ± 0.010 g/mol for NaCl, limited by chlorine). Older tables used values such as H 1.007 94 and S 32.065, so results can differ from them in the second or third decimal.
How to type formulas
- Brackets: ( ), [ ] and { } nest freely:
Ca3(PO4)2,K4[Fe(CN)6],[Co(NH3)5Cl]Cl2. - Hydrates and adducts:
CuSO4·5H2O,CuSO4*5H2O,CuSO4.5H2OorCuSO4 5H2O; halves asCaSO4·0.5H2O,CaSO4·1/2H2OorCaSO4·½H2O; a multiplier on the first part as in2CaSO4·H2O. - Decimal subscripts for non-stoichiometric solids:
Fe0.95O,La0.7Sr0.3MnO3(write a leading zero). - Charges at the end:
SO4^2-,SO4{2-},SO4(2-),SO4²⁻,NH4+,Fe3+,Fe+++. One digit before the sign is read as a charge only for a lone element that has that oxidation state (Fe3+ is Fe³⁺, NH4+ is NH₄⁺); use ^ to be explicit. - Isotopes: D and T for deuterium and tritium;
^13C,¹³Cor[13C]for any other isotope. A lone isotope can also be typed asC-14,U-235orcarbon-14. - States at the end are allowed and ignored for the mass:
(s),(l),(g),(aq). - Oxidation states in Roman numerals are read and left out:
Fe(III)Cl3is FeCl₃,Cu(I)2Ois Cu₂O. - Names: about 175 common substances (water, glucose, sodium chloride, Tris, HEPES, EDTA …) and every element name. Each formula was checked against PubChem, and the CID is shown so you can verify it.
Monoisotopic mass and degree of unsaturation
The monoisotopic mass uses the mass of the most abundant isotope of each element instead of the average atomic weight; the nominal mass rounds each of those isotope masses to a whole number first (IUPAC Definitions of Terms Relating to Mass Spectrometry, Recommendations 2013). For molecules made of C, H, N, O and S, whose most abundant isotopes are also the lightest, it is the first peak of the isotope pattern in a high-resolution mass spectrum: 194.080 376 Da for caffeine, against an average molar mass of 194.194. For an ion the calculator also gives m/z, subtracting or adding the electrons (mₑ = 0.000 548 580 u, CODATA 2022).
The degree of unsaturation (also called double-bond equivalents) is the number of rings plus π bonds: (2C + 2 + N − H − X) ÷ 2, where halogens X count like hydrogen, oxygen and sulfur are ignored and nitrogen adds one (OpenStax Organic Chemistry §7.2). Silicon is counted like carbon and phosphorus like nitrogen. Benzene, C₆H₆, has 4: one ring and three double bonds. The formula describes one molecule, so for a hydrate or adduct such as C₆H₁₂O₆·H₂O or Tris·HCl it is worked out for the organic part alone.
Sources
- IUPAC Commission on Isotopic Abundances and Atomic Weights: Standard Atomic Weights 2024, Abridged Standard Atomic Weights, Isotopic Compositions of the Elements and Radioactive Elements.
- NIST, Atomic Weights and Isotopic Compositions with Relative Atomic Masses, version 4.1 (isotope masses from the 2012 Atomic Mass Evaluation).
- CODATA 2022 values from NIST: Avogadro constant and electron mass in u.
- IUPAC, Definitions of Terms Relating to Mass Spectrometry (Recommendations 2013), doi:10.1351/PAC-REC-06-04-06.
- OpenStax, Chemistry 2e (CC BY 4.0), §3.1 Formula Mass and the Mole Concept; OpenStax, Organic Chemistry, §7.2 Calculating the Degree of Unsaturation.
- E. A. Hill, J. Am. Chem. Soc. 22, 478–494 (1900), doi:10.1021/ja02046a005 (Hill order).
- PubChem (NCBI) for the formulas behind compound names.
Limitations
- The molar mass of a real sample depends on its isotopic composition. Results apply to normal terrestrial materials; isotopically enriched or depleted materials (for example depleted lithium or uranium) can differ by more than the ± shown.
- Lead’s atomic weight varies so much in nature (206.14–207.94) that lead compounds carry about ±1.1 g/mol per lead atom.
- Organic abbreviations such as Me, Et and Ph are not expanded: write CH3, C2H5 and C6H5.
- Names cover a curated list of common substances, not every compound. For anything else type the formula.
- The degree of unsaturation assumes the usual valences (C 4, N 3, O 2, halogens 1), so groups such as sulfones or nitro groups written with higher valences are not counted as double bonds.
- Isotopes beyond the naturally occurring ones and a few common radioactive ones load an extra data file (about 65 kB) the first time they are used; offline, that works only after one use online.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What is the difference between molar mass and molecular weight?
They are the same number with different units. Molar mass is in g/mol; molecular weight (relative molecular mass, Mr) has no unit, and the mass of one molecule is the same number in daltons (u). Water is 18.015 g/mol, Mr 18.015, 18.015 Da per molecule.
Why does my textbook give 18.02 g/mol for water, or 58.44 for NaCl?
Only rounding: 18.015 rounds to 18.02, and 58.440 to 58.44. Older tables also used slightly different atomic weights (H 1.007 94, O 15.9994), which change the third decimal at most for small molecules.
How do I enter a hydrate such as copper sulfate pentahydrate?
Type CuSO4·5H2O, CuSO4*5H2O or CuSO4.5H2O. The result shows the water of crystallisation (36.08 % here) and the molar mass of the anhydrous salt, 159.602 g/mol.
Does the charge of an ion change its molar mass?
Strictly by the mass of the electrons gained or lost, which is about 0.000 55 g/mol each — so, as is usual, it is ignored: SO₄²⁻ is 96.056 g/mol. The mass spectrometry figures (m/z) do include the electrons.
What does the ± number mean?
It is every atom’s atomic-weight uncertainty from CIAAW added together, so the molar mass of any normal sample lies within that range. Report no more decimals than it supports: NaCl is 58.44 ± 0.010 g/mol.
Can I calculate the mass of an isotopically labelled compound?
Yes: use D or T for hydrogen isotopes and ^13C, ¹³C or [13C] style labels for any other isotope known to NIST — 3,352 isotopes in all. ^13C6H12O6 gives glucose labelled with carbon-13 throughout.
What is the degree of unsaturation?
The number of rings plus π bonds a molecular formula implies: (2C + 2 + N − H − X) ÷ 2. C₆H₆ gives 4 (benzene: one ring, three double bonds); a saturated alkane gives 0. It is shown only for organic formulas made of C, H, N, O, S, P, Si and halogens.
Is my formula sent anywhere?
No. Everything is calculated in your browser, and the calculator keeps working offline once the page has loaded.