Molecular Weight (Molar Mass) Calculator
Compute molar mass from a chemical formula, including parentheses and multipliers. You’ll get a total molar mass in g/mol plus a per-element breakdown and percent composition. Everything runs locally in your browser.
Formula
Supports parentheses and multipliers like Ca(OH)2 and Al2(SO4)3.
Saved locally in your browser.
Molar mass snapshot
Molecular Weight (Molar Mass)
Formula: Ca(OH)2
| Element | Count | Atomic mass | Contribution | % |
|---|---|---|---|---|
CaCalcium | 1 | 40.078 | 40.078 | 54.09 |
OOxygen | 2 | 15.999 | 31.998 | 43.19 |
HHydrogen | 2 | 1.008 | 2.016 | 2.72 |
| Total | 74.092 | 100.00 |
Mass contribution (percent)
Atomic masses are standard average atomic weights. This calculator is educational and may differ slightly from specific lab references.
What is molar mass?
Molar mass (sometimes called molecular weight) is the mass of one mole of a substance. For a pure chemical compound, the molar mass is found by adding the atomic masses of each element in the formula, multiplied by how many atoms of that element appear in the compound. The usual unit is grams per mole (g/mol).
How to read chemical formulas with parentheses
Parentheses group atoms together so a multiplier applies to everything inside the group. For example, in Ca(OH)2, the 2 applies to both O and H, meaning the formula contains 1 Ca, 2 O, and 2 H. In Al2(SO4)3, the 3 applies to S and O4, so you have 2 Al, 3 S, and 12 O.
Percent composition
Percent composition tells you what fraction of the total molar mass comes from each element. This is useful for chemistry homework, preparing lab solutions, and checking whether an experimental measurement is consistent with a proposed formula.
How to use this molar mass calculator
- Enter a formula using element symbols and optional multipliers, for example H2O, C6H12O6, Ca(OH)2, or Al2(SO4)3.
- Check the breakdown to see each element’s count, atomic weight used, mass contribution, and percent of the total.
- Export as JSON or CSV when you need to attach results to a lab write-up, worksheet, or study notes.
Supported syntax and limitations
This calculator supports nested grouping with parentheses, brackets, or braces (for example K4[Fe(CN)6]) and integer multipliers after an element or group. It ignores whitespace.
It does not currently support dot/hydrate notation (like CuSO4·5H2O), ionic charge annotations (like SO4^2-), or isotopic notation. If your course uses those formats, convert the compound to an equivalent expanded formula before calculating.
Notes about accuracy and references
Atomic masses are standard average atomic weights. Different references may round values differently or use isotopic masses for specialized problems, so small differences are expected depending on context. Use the breakdown table to see exactly which atomic masses were used in the calculation.
This molar mass calculator runs entirely in your browser and does not upload your formulas to a server. It stores your last-used formula in localStorage for convenience (clearing your browser data removes that history).
Related tools
Molar mass FAQ
What is the difference between molar mass and molecular weight?
In many classroom contexts, “molecular weight” is used informally for molar mass. Technically, molar mass is mass per mole (g/mol), while molecular weight is a relative, unitless comparison. Most homework problems mean g/mol.
Why do parentheses matter in formulas?
Parentheses indicate a group that is multiplied. In Ca(OH)2, the 2 applies to both O and H, so the compound contains two oxygen atoms and two hydrogen atoms.
What is percent composition used for?
Percent composition is commonly used to connect measured mass percentages to a formula, check an empirical formula, or explain why one element dominates the mass of a compound.
Why is my result slightly different from another calculator?
Different references round atomic weights differently, and some problems use isotopic masses instead of average atomic weights. Small differences are normal; for grading, use the same reference your course expects.
Is my formula uploaded to the internet?
No. The calculator runs locally in your browser and does not upload the formula you enter.