Zero Signup ToolsFree browser tools

Calculator Tools

Molar Mass Calculator

Calculate the molar mass and percent composition of any chemical formula. Supports parentheses, hydrates, charges, and grams-to-moles conversion.

Supports nested parentheses, square brackets, curly braces, and hydrate dots (e.g. CuSO4.5H2O or CuSO4·5H2O). Charges like SO4(2-) are accepted but ignored.

Molar mass

18.0150

g/mol

Hill formula

H2O

Sorted by the Hill convention.

Atoms per unit

3

Total atom count in the formula.

Percent composition by mass

ElementCountAtomic weight (g/mol)Contribution (g/mol)Percent
OOxygen
115.999015.9990
88.81 %
HHydrogen
21.00802.0160
11.19 %

Grams to moles converter

Enter a sample mass to convert to moles and molecules using the molar mass above.

Example compounds

How to use

  1. Type a chemical formula into the input. Examples: H2O, C6H12O6, Ca(OH)2, Al2(SO4)3, CuSO4.5H2O, K4[Fe(CN)6].
  2. Read the molar mass card for the total in grams per mole. The Hill formula card shows the same compound in the standard textbook ordering.
  3. Use the percent composition table to see how much of the total mass each element contributes. Elements flagged isotope use the longest-lived isotope mass.
  4. Enter a sample mass in the grams to moles converter and pick a unit. The tool reports moles and the number of molecules using Avogadro's number.
  5. Click any example compound to load it into the input.
  6. Copy summary copies the formula, molar mass, percent composition table, and any sample conversion to your clipboard as plain text.

About this tool

Molar Mass Calculator parses a chemical formula and returns its molar mass in grams per mole, the percent composition of each element by mass, and an optional grams-to-moles conversion for a sample. The formula parser understands plain element symbols and subscripts (H2O, CO2, NaCl, C6H12O6), nested groups with any of parentheses, square brackets, or curly braces (Al2(SO4)3, K4[Fe(CN)6], [NH4]Cl), hydrate dot notation with ASCII periods or the Unicode middle dot (CuSO4.5H2O and CuSO4·5H2O both parse), Unicode subscript digits (H₂O), and leading coefficients applied to a chunk (2 H2O, 3 (NH4)2SO4). Ionic charge markers such as SO4(2-) and (NH4)+ are accepted but ignored because electron mass is negligible at chemistry precision. Atomic weights come from the conventional IUPAC standard atomic weights (2021 revision); radioactive elements without a stable isotope (technetium, promethium, polonium through oganesson) use the mass number of their longest-lived isotope and are flagged in the results table so you can spot them. The percent composition table is sorted by mass contribution and includes a horizontal percent bar for each element, plus the Hill-system empirical formula (carbon first, hydrogen second, then alphabetical) for quick reference. The grams-to-moles panel converts a sample mass in grams, milligrams, or kilograms into both moles and number of molecules using Avogadro's number (6.022 x 10^23), which is the workflow chemistry homework and lab prep walk through every day. Twelve preset compounds load with one click. Everything runs in your browser; the formula and sample mass never leave your device.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsCalculator Tools