Molecular Weight Calculator

Calculate molecular weight and molar mass from a chemical formula, including element counts, parentheses, and each element's mass contribution.

Chemical formula molar mass calculator
Enter a formula with standard element symbols, subscripts, and optional parentheses.

About the molecular weight calculator

Molecular weight is the sum of the standard atomic weights of every atom represented in a chemical formula. Chemists often use the closely related term molar mass, expressed in grams per mole, when connecting a formula to a measurable sample. The numerical values are effectively the same for routine calculations: a water molecule has a relative molecular mass near 18.015, while one mole of water has a molar mass of 18.015 grams per mole. This calculator reads element symbols, numerical subscripts, and grouped formulas in parentheses. It identifies each element, totals its atom count, multiplies that count by the element's standard atomic weight, and adds all contributions. In H2O, two hydrogen atoms contribute 2.016 and one oxygen atom contributes 15.999, producing 18.015 g/mol. In Ca(OH)2, the subscript outside the parentheses multiplies both oxygen and hydrogen, so the formula contains one calcium, two oxygen, and two hydrogen atoms. Capitalization is meaningful in chemical notation. Co represents cobalt, whereas CO represents one carbon and one oxygen. Always start an element symbol with an uppercase letter and use a lowercase second letter when required. An omitted subscript means one atom. Parentheses should be balanced, and the multiplier after a group applies to every element in that group. This version covers common elements used in general chemistry examples; an unsupported symbol is reported instead of silently producing an incorrect total. Atomic weights are weighted averages based on naturally occurring isotopes, so published tables can differ slightly in their final decimal places. The calculator uses conventional rounded standard values suitable for education, stoichiometry, solution preparation, and most laboratory planning. Isotope-specific work requires the exact isotopic mass rather than an average atomic weight. Ionic charge does not materially change ordinary molar mass and is not entered in this formula field. Molar mass is essential for converting grams to moles, determining reagent quantities from a balanced equation, preparing solutions of known molarity, and interpreting elemental composition. Use the element breakdown to catch formula-entry mistakes before relying on the total. Preserve extra digits during intermediate calculations and round the final experimental answer according to significant-figure rules and the precision of your measured data.

Molecular weight examples

Chemical formulaMolar massElement count
H2O18.015 g/molTwo hydrogen atoms and one oxygen atom.
C6H12O6180.156 g/molGlucose contains six carbon, twelve hydrogen, and six oxygen atoms.
Ca(OH)274.092 g/molThe outside subscript doubles both atoms inside the hydroxide group.

How to calculate molecular weight

  1. Write the chemical formula with correct capitalization and numerical subscripts.
  2. Use balanced parentheses when a repeated group contains more than one element.
  3. Enter the formula and select Calculate Molecular Weight.
  4. Review the total molar mass and element-by-element contribution for accuracy.

Molecular weight calculator FAQ

Are molecular weight and molar mass the same?

They share the same numerical value for a substance in ordinary chemistry. Relative molecular weight is dimensionless, while molar mass is conventionally reported in grams per mole.

How are parentheses handled in a chemical formula?

A subscript after a closing parenthesis multiplies every atom count inside that group. For Ca(OH)2, both oxygen and hydrogen are counted twice.

Why does capitalization matter?

Every element symbol starts with an uppercase letter, and some have a lowercase second letter. Changing capitalization can create a different set of elements or make the formula invalid.

Why might another table give a slightly different answer?

Standard atomic weights may be rounded to different decimal places and can be updated as isotope measurements improve. Small differences in the last displayed digits are usually due to those conventions.

Can this calculate an isotope's exact mass?

No, this calculator uses average standard atomic weights for naturally occurring elements. Isotope-specific calculations need the exact nuclide masses and isotope counts.