Skip to content
CalculatorZilo Logo
  • Home
  • CalculatorsExpand
    • Browse all calculators
    • Education
    • Real Estate
    • Chemistry
  • Finance
  • Math
  • Health & Fitness
  • Science
  • About
  • Contact
CalculatorZilo Logo
Home / Chemistry Calculators / Compound Mass Calculator
Chemistry Calculators

Compound Mass Calculator

Published onJune 19, 2025 Updated onNovember 2, 2026 4:35 pm

Nearly every chemistry calculation that involves weighing something starts with one number: how much a mole of the compound weighs. Get it wrong and the solution concentration, the limiting reagent, and the yield all inherit the error.

Type a chemical formula and this calculator sums the standard atomic weights element by element, returning the molar mass (molecular weight) in grams per mole to four decimal places. It is a molar mass tool, not a unit converter: for weighing and converting ordinary masses rather than chemical formulas, that is a different job.

Compound Mass Calculator
Molar mass in g/mol from a chemical formula, using standard atomic weights


Compound molar mass (g/mol)

Covers all 118 elements (listed in the table below), with parentheses, brackets and hydrate dots parsed as written. Atomic weights are the standard values used in textbooks, so small differences from other calculators come from their weight tables, not from the arithmetic. For the 34 elements that have no standard atomic weight, the table uses the mass number of the longest-lived isotope, marked in the table below.

Quick Answer

Quick answer: The calculator is pre-filled with glucose, C6H12O6. Carbon contributes 6 x 12.011 = 72.066, hydrogen 12 x 1.008 = 12.096, and oxygen 6 x 15.999 = 95.994, for a molar mass of 180.1560 g/mol. The method is always the same three steps: count the atoms, multiply each count by that element's atomic weight, and add.

Key takeaways

  • Molar mass = sum over elements of (atoms x atomic weight). Nothing else is hiding in the calculation.
  • Capitalization is chemistry, not style: CO and Co are different substances, carbon monoxide and cobalt, and the calculator reads them differently.
  • Parentheses, brackets and hydrate dots are typed exactly as written: Ca(OH)2, K4[Fe(CN)6] and CuSO4·5H2O all parse directly, group multipliers and hydrate coefficients included.
  • Small disagreements between calculators (18.015 vs 18.016 for water) come from atomic weight conventions. Match your course or lab table when it matters.
On this page
  • Quick Answer
  • How to use the compound mass calculator
  • The formula behind molar mass
  • Worked examples, including parentheses, a bracket and a hydrate
  • The atomic weights this calculator uses
  • What this calculator covers, and why each part matters
  • Frequently Asked Questions
  • Add This Calculator to Your Website
  • References

How to use the compound mass calculator

Write the formula exactly as it appears in your textbook or lab sheet, with a capital first letter for each element symbol and the atom counts as plain numbers: H2O, CO2, NaCl, H2SO4. Parentheses, square brackets and curly braces can be typed as written, nested as deep as the formula needs, and so can the dot in a hydrate, as a middle dot or a plain full stop: CuSO4·5H2O or CuSO4.5H2O. A number in front of a formula, or in front of a hydrate part, multiplies that whole part. Press Calculate and the molar mass appears in g/mol to four decimal places. If the calculator answers with an unknown element message, a symbol is misspelled or miscapitalized: all 118 elements are in the table further down, so no valid symbol is turned away.

Repeated elements need no special handling. Acetic acid written as CH3COOH parses as carbon twice, hydrogen four times in total, and oxygen twice, and because the method is a pure sum, the result (60.0520 g/mol) is identical to entering the consolidated formula C2H4O2. What the tool cannot do is convert the result further: turning grams into moles is one division by the number you just computed, shown in the FAQ, and averaging the mass of an element across its isotopes is a separate problem, handled by the average atomic mass calculator.

The formula behind molar mass

The formula: Molar mass = sum of (atomic weight of each element x number of its atoms in the formula), in g/mol. For glucose: (6 x 12.011) + (12 x 1.008) + (6 x 15.999) = 72.066 + 12.096 + 95.994 = 180.156 g/mol.

The atomic weights are not arbitrary constants. They are the weighted averages of each element's naturally occurring isotopes, maintained by the Commission on Isotopic Abundances and Atomic Weights, which is why carbon is 12.011 rather than exactly 12: about one carbon atom in a hundred is carbon-13. That averaging is also why molar masses are quoted to a few decimal places rather than as whole numbers, and why two honest calculators can disagree in the third decimal if they use different vintages of the table.

Worked examples, including parentheses, a bracket and a hydrate

Each result below is what this calculator returns for the formula as typed, verified against the atomic weight table it actually uses.

Formula enteredBreakdownMolar mass
H2O (water)2 x 1.008 + 15.99918.0150 g/mol
CO2 (carbon dioxide)12.011 + 2 x 15.99944.0090 g/mol
NaCl (table salt)22.990 + 35.45058.4400 g/mol
H2SO4 (sulfuric acid)2 x 1.008 + 32.060 + 4 x 15.99998.0720 g/mol
C6H12O6 (glucose)72.066 + 12.096 + 95.994180.1560 g/mol
Ca(OH)2 (calcium hydroxide)40.078 + 2 x 15.999 + 2 x 1.00874.0920 g/mol
CuSO4·5H2O (copper sulfate pentahydrate)63.546 + 32.060 + 4 x 15.999 + 5 x (2 x 1.008 + 15.999)249.6770 g/mol
K4[Fe(CN)6] (potassium ferrocyanide)4 x 39.098 + 55.845 + 6 x 12.011 + 6 x 14.007368.3450 g/mol

The last three rows show the counting instructions the parser follows. A parenthesis or bracket multiplies everything inside it by the number after it, and a hydrate dot adds whole water molecules, multiplied by the coefficient in front of the water. Nothing needs expanding by hand: type the formula as it is printed and the counts come out the same. Students who then need the mass of an ingredient mixture rather than a pure compound are solving an averaging problem instead, which is what the average mass calculator is for.

118
Elements in the calculator's table
4
Decimal places in every result
18.0150
g/mol for water with these weights
180.1560
g/mol for glucose, the worked example

The atomic weights this calculator uses

Auditing a molar mass answer means auditing the table behind it, so here is the whole table, exactly as the code holds it: H 1.008, He 4.0026, Li 6.94, Be 9.0122, B 10.81, C 12.011, N 14.007, O 15.999, F 18.998, Ne 20.180, Na 22.990, Mg 24.305, Al 26.982, Si 28.085, P 30.974, S 32.06, Cl 35.45, Ar 39.948, K 39.098, Ca 40.078, Sc 44.956, Ti 47.867, V 50.942, Cr 51.996, Mn 54.938, Fe 55.845, Co 58.933, Ni 58.693, Cu 63.546, Zn 65.38, Ga 69.723, Ge 72.630, As 74.922, Se 78.971, Br 79.904, Kr 83.798, Rb 85.468, Sr 87.62, Y 88.906, Zr 91.224, Nb 92.906, Mo 95.95, Tc 98, Ru 101.07, Rh 102.91, Pd 106.42, Ag 107.87, Cd 112.41, In 114.82, Sn 118.71, Sb 121.76, Te 127.60, I 126.90, Xe 131.29, Cs 132.91, Ba 137.33, La 138.91, Ce 140.12, Pr 140.91, Nd 144.24, Pm 145, Sm 150.36, Eu 151.96, Gd 157.25, Tb 158.93, Dy 162.50, Ho 164.93, Er 167.26, Tm 168.93, Yb 173.05, Lu 174.97, Hf 178.49, Ta 180.95, W 183.84, Re 186.21, Os 190.23, Ir 192.22, Pt 195.08, Au 196.97, Hg 200.59, Tl 204.38, Pb 207.2, Bi 208.98, Po 209, At 210, Rn 222, Fr 223, Ra 226, Ac 227, Th 232.04, Pa 231.04, U 238.03, Np 237, Pu 244, Am 243, Cm 247, Bk 247, Cf 251, Es 252, Fm 257, Md 258, No 259, Lr 266, Rf 267, Db 268, Sg 271, Bh 272, Hs 277, Mt 278, Ds 281, Rg 282, Cn 285, Nh 286, Fl 289, Mc 290, Lv 293, Ts 294, Og 294. These are the conventional textbook values published for general use by IUPAC, the International Union of Pure and Applied Chemistry, and they are the same standard weights our exact massref="https://calculatorzilo.com/mass-calculator/">mass calculator uses, so the two tools agree element for element. Thirty-four elements have no standard atomic weight at all, because they have no stable natural form: for those the table uses the mass number of the longest-lived known isotope, written in parentheses here: Tc (98), Pm (145), Po (209), At (210), Rn (222), Fr (223), Ra (226), Ac (227), Np (237), Pu (244), Am (243), Cm (247), Bk (247), Cf (251), Es (252), Fm (257), Md (258), No (259), Lr (266), Rf (267), Db (268), Sg (271), Bh (272), Hs (277), Mt (278), Ds (281), Rg (282), Cn (285), Nh (286), Fl (289), Mc (290), Lv (293), Ts (294), Og (294). Any symbol that is not a real element at all returns an unknown element message rather than a silent approximation.

What this calculator covers, and why each part matters

This calculator turns a chemical formula, typed exactly as written, into its molar mass – with the weight table printed on the same page so every answer can be audited.

  • Type the formula as written. Parentheses, brackets and hydrate dots parse directly: Ca(OH)2, K4[Fe(CN)6] and CuSO4·5H2O all work, group multipliers and hydrate coefficients included. Capitalization is chemistry, not style: CO and Co are different substances, carbon monoxide and cobalt, and the calculator reads them differently.
  • All 118 elements. The method is always the same three steps: count the atoms, multiply each count by that element's atomic weight, and add. The calculator is pre-filled with glucose, C6H12O6: carbon contributes 6 × 12.011 = 72.066, hydrogen 12 × 1.008 = 12.096, and oxygen 6 × 15.999 = 95.994, for a molar mass of 180.1560 g/mol.
  • Answers to four decimals, auditable against the printed table. Small disagreements between calculators (18.015 vs 18.016 for water) come from atomic weight conventions, so the full weight table is printed on the same page: match your course or lab table when it matters, and check whether a 0.001 disagreement is your own error or a convention difference.
  • Two honest limits. No grams-to-moles conversion is built in, and no mass percentage composition. For a single molar mass from any formula you can write down, this page has what you need; for composition breakdowns, the mass percent calculator works out the percentage composition of a compound on its own.

Frequently Asked Questions

It is the mass of one mole of a substance: one mole of its molecules or formula units, weighed in grams. Water has a molar mass of 18.015 g/mol, so 18.015 grams of water contains the same number of molecules as 58.440 grams of table salt contains formula units. Molar mass is the bridge between counting particles and weighing chemicals on a balance.

All 118 elements, from hydrogen to oganesson, including the bromine and cobalt that smaller tables leave out. Eighty-four of them carry a standard atomic weight. The other 34, such as technetium, plutonium and the superheavy elements, have no standard atomic weight because they have no stable natural form, so the calculator uses the mass number of their longest-lived known isotope, marked in the table on this page. If a symbol is not a real element at all, the calculator says so instead of guessing.

Yes, exactly as written. Ca(OH)2 means one calcium, two oxygens, and two hydrogens, and entering it directly returns 74.0920 g/mol. Square brackets and curly braces work the same way, nested groups included: K4[Fe(CN)6] returns 368.3450 g/mol. Hydrates work too: enter CuSO4 with five waters as CuSO4·5H2O (a plain full stop, CuSO4.5H2O, works as well) and you get 249.6770 g/mol.

Almost always because of the atomic weight table, not the arithmetic. This calculator uses hydrogen 1.008 and oxygen 15.999, giving water as 18.015 g/mol. A tool using hydrogen 1.0079 returns 18.0158, and one rounding oxygen to 16.00 returns 18.016. All three are defensible; for coursework, match the table your teacher or textbook uses.

Yes, completely. Co is cobalt, while CO is carbon plus oxygen, and the calculator reads a capital letter as the start of a new element symbol. NaCl works; nacl and NACL do not mean table salt. If you get an unknown element message, check the capitalization before anything else.

Divide. Moles = mass in grams divided by molar mass, and grams = moles times molar mass. The worked example on this page: 36.03 grams of water divided by 18.015 g/mol is exactly 2 moles. Solution recipes, limiting-reagent problems, and gas calculations almost all pass through this one division.

Numerically, yes, for the same formula. Molecular weight is the older name for the same sum of atomic weights; strictly it is dimensionless, while molar mass carries the unit g/mol. Chemists use the two interchangeably in everyday work, and this calculator reports the g/mol form. A close cousin used in mass spectrometry is the exact mass: the exact mass calculator sums the most abundant isotope masses for a formula and returns the ion values spectrometrists search for.

Add This Calculator to Your Website

Embed the Compound Mass Calculator on your own site. Pick a size to preview it live, then copy the code.



Powered by Calculator Zilo

References

  1. Commission on Isotopic Abundances and Atomic Weights (CIAAW), "Atomic Weights of the Elements": the body that maintains the standard atomic weights this calculator uses. CIAAW: Atomic Weights. Accessed October 2026.
  2. International Union of Pure and Applied Chemistry (IUPAC), "Periodic Table of Elements": the official periodic table and element data behind textbook atomic weights. IUPAC: Periodic Table of Elements. Accessed October 2026.
  3. Royal Society of Chemistry, "Periodic Table": element-by-element data including atomic weights and isotope information for checking individual elements. Royal Society of Chemistry: Periodic Table. Accessed October 2026.

Related calculators

Chemistry Calculators L To Lbs CalculatorConvert liters to pounds for water, milk, cooking oil, honey, gasoline, diesel and any other liquid.Chemistry CalculatorsNet Ionic Equations CalculatorA net ionic equation strips a reaction down to the species that actually change: the ions that form a precipitate, a gas, or water, with the unchanged spectator ions removed.Chemistry CalculatorsMole CalculatorThe mole is how chemists count things too small to count: one mole of anything holds exactly 6.02214076 × 1023 particles.Chemistry CalculatorsPh Adjustment CalculatorThe old version of this page estimated acid and base doses from the pH change alone, and that rule is wrong...Chemistry CalculatorsComplete Ionic Equation CalculatorType any aqueous chemical equation and get the full ionic breakdown: the balanced molecular equation, the...Chemistry CalculatorsBalancing Nuclear Equations Calculator A nuclear equation balances on two counts at once: the mass numbers (the top numbers, A) must add up the same...

We use cookies to analyze traffic. You can accept or decline cookies below. Learn more

calculatorzilo

CalculatorZilo

Free calculators for everyday life. No signup, no cost, just answers.

Categories

Finance Math Health & Fitness Education Science Real Estate Chemistry Browse all calculators

Popular tools

Mortgage Payment Calculator BMI Walking Calculator Salary Per Minute Calculator Percentage Off Calculator

Company

About Us Contact Us Privacy Policy Terms and Conditions
Disclaimer Cookie Policy DMCA Policy Affiliate Disclosure FAQ Accessibility Statement

© 2026 CalculatorZilo • Free calculators for everyone

  • Home
  • Calculators
    • Browse all calculators
    • Education
    • Real Estate
    • Chemistry
  • Finance
  • Math
  • Health & Fitness
  • Science
  • About
  • Contact
Search