Chemistry

Molar mass calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Source

Please enter a valid URL. Only HTTPS URLs are supported.

Styling

Input border focus color, switchbox checked color, select item hover color etc.

Advanced

Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a molar mass calculator?

A molar mass calculator is a free online tool that reads a chemical formula and returns the mass of one mole of that substance, expressed in grams per mole (g/mol). You type a formula such as H2O, C6H12O6, or Ca(OH)2, and the calculator identifies each element, looks up its standard atomic weight, multiplies that weight by the number of atoms present, and adds everything together. The molar mass is the bridge between the number of particles in a sample and a quantity you can actually weigh on a balance, which makes it one of the most-used values in chemistry.

How does it work?

Every element on the periodic table has a standard atomic weight, a value averaged over the naturally occurring isotopes and measured relative to carbon-12. The calculator stores these weights for the common elements and walks through your formula one symbol at a time.

An element symbol is a capital letter, optionally followed by one or more lowercase letters, so C is carbon while Ca is calcium and Cl is chlorine. A number after a symbol is a subscript that tells you how many of that atom appear; when no number is written, the count is one. The tool also understands grouping with parentheses ( ), square brackets [ ], and curly braces { }. A subscript after a closing bracket multiplies everything inside the group, and groups may be nested inside other groups. If the calculator meets a symbol it does not recognize or a bracket that never closes, it treats the whole formula as invalid and returns no result rather than guessing.

Formula

The molar mass MM is the sum, over every element in the compound, of that element’s standard atomic weight AiA_i multiplied by the number of its atoms nin_i:

M=iniAiM = \sum_{i} n_i \cdot A_i

For water, H2OH_2O, there are two hydrogen atoms and one oxygen atom, so:

MH2O=21.008+15.999=18.02 g/molM_{H_2O} = 2 \cdot 1.008 + 15.999 = 18.02\ \text{g/mol}

When a group is repeated, its whole contents are multiplied by the trailing subscript. For calcium hydroxide, Ca(OH)2Ca(OH)_2, the OHOH group is counted twice:

MCa(OH)2=40.078+2(15.999+1.008)=74.09 g/molM_{Ca(OH)_2} = 40.078 + 2 \cdot (15.999 + 1.008) = 74.09\ \text{g/mol}

Worked examples

  1. Water, H2O. Two hydrogen atoms and one oxygen: 21.008+15.999=18.022 \cdot 1.008 + 15.999 = 18.02 g/mol.

  2. Glucose, C6H12O6. Six carbon, twelve hydrogen, and six oxygen atoms: 612.011+121.008+615.999=180.166 \cdot 12.011 + 12 \cdot 1.008 + 6 \cdot 15.999 = 180.16 g/mol.

  3. Table salt, NaCl. One sodium and one chlorine atom: 22.99+35.45=58.4422.99 + 35.45 = 58.44 g/mol.

  4. Calcium hydroxide, Ca(OH)2. One calcium plus two hydroxide groups: 40.078+2(15.999+1.008)=74.0940.078 + 2 \cdot (15.999 + 1.008) = 74.09 g/mol.

Each result is rounded to two decimal places, which is more than enough precision for typical lab work and homework.

Notes

The atomic weights used here are the widely quoted standard values; a formula that includes a rare element the calculator does not stock, or a typo such as Xx, will produce no result. The tool assumes a neutral compound and ignores charge, water of crystallisation written with a raised dot, and isotope labels, so a hydrate like CuSO4·5H2O should be entered as its expanded formula. Molar mass is numerically equal to the formula weight in atomic mass units, so the same number that describes one molecule in daltons describes one mole in grams.

FAQs

What units does the result use?

The result is given in grams per mole (g/mol). One mole is Avogadro’s number of particles, about 6.022×10236.022 \times 10^{23}, so the molar mass tells you how many grams of the substance contain that many formula units.

Can I use parentheses and brackets?

Yes. Parentheses ( ), square brackets [ ], and curly braces { } all work, and they can be nested. A subscript after a closing bracket multiplies every atom inside the group, so Ca(OH)2 correctly counts two oxygen and two hydrogen atoms.

Why did I get no result?

The calculator returns nothing when the formula is empty, contains an element symbol it does not recognize, or has brackets that do not match up. Check the capitalisation of your symbols, since Co (cobalt) and CO (carbon monoxide) mean different things, and make sure every opening bracket has a matching closing bracket.

Report a bug

This field is required.