Molecular Weight CalculatorFree online other calculator — instant results, no sign-up
Molar mass from a chemical formula (e.g. C6H12O6).
Sign in to save results and favorites.
About the Molecular Weight Calculator
This calculator computes the molecular weight (molar mass) of a chemical compound from its standard chemical formula. It is designed for chemistry students, educators, and laboratory researchers who need quick molar mass determinations for stoichiometric calculations and solution preparation. The tool parses empirical or molecular chemical notations and sums the standard atomic weights of all constituent atoms.
- Formula
- Standard chemical formula string (e.g., C6H12O6, H2O, or NaCl), using capitalized standard element symbols and optional integer counts
Formula and method
Molecular Weight = Σ (Atomic Weight of Element_i × Count_i)
- Element_iStandard atomic symbol parsed from the chemical formula
- Count_iNumber of atoms of the specified element (defaults to 1 if unspecified)
- Molecular WeightTotal molar mass of the compound in grams per mole (g/mol)
The tool uses regular expressions to extract every element symbol and its trailing stoichiometric count. It multiplies the element's predefined atomic weight by its count, sums these products across the molecule, and formats the total to three decimal places in g/mol. If any parsed element symbol is not in the internal table, the calculator returns an unknown element notice.
Worked example
These are the calculator's starting values and the results it actually produces for them.
Inputs
- FormulaC6H12O6
Results
- Molecular weight180.156 g/mol
How to use the Molecular Weight Calculator
- 1Enter a valid chemical formula such as C6H12O6 or NaCl into the Formula input field.
- 2The tool parses uppercase and lowercase letters to identify individual element symbols.
- 3Each recognized element's standard atomic mass is multiplied by its designated stoichiometric subscript.
- 4The component masses are added together and rounded to three decimal places to display the final molecular weight in g/mol.
Reading your result
The result represents the mass in grams of one mole (6.022 × 10²³ molecules or formula units) of the entered substance. A higher value indicates heavier constituent atoms or larger molecular structures. You can use this figure directly to convert between measured mass and moles in quantitative chemistry workflows.
Limitations
The calculator recognizes a specific set of 22 common elements (H, He, Li, C, N, O, F, Na, Mg, Al, Si, P, S, Cl, K, Ca, Fe, Cu, Zn, Br, Ag, I, Au) and will flag any other periodic table element as unknown. It does not parse structural parentheses or hydrates (e.g., formulas containing brackets, parentheses, or dots like CuSO4·5H2O must have their atoms manually summed into raw elemental counts).
Common questions
Why does the calculator return 'Unknown element' for my formula?+
This occurs if the formula contains an element not included in the tool's 22-element database (such as titanium, lead, or platinum) or if an element's capitalization is incorrect, like writing 'cl' instead of 'Cl'.
Can I use parentheses in formulas, like Ca(OH)2?+
No, the parser does not evaluate nested groups or parenthesis multipliers. To evaluate Ca(OH)2, expand the counts into flat notation such as CaO2H2.
What unit is the molecular weight measured in?+
The molecular weight is given in grams per mole (g/mol), which is numerically equivalent to unified atomic mass units (u or Da) per molecule.
Does the calculator save my information?+
Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.
Further reading
You might also like
IP Subnet Calculator
Network, broadcast and host range of an IPv4 subnet.
Password Generator
Create a strong random password.
Voltage Drop Calculator
Voltage drop on a copper conductor.
GDP Calculator
GDP by the expenditure approach.
Horsepower Calculator
Horsepower from torque and RPM.
Engine Horsepower Calculator
Estimate horsepower from weight and quarter-mile time.
Results are estimates for informational purposes and are not financial, medical or legal advice.