Molar Mass Calculator

Molar mass and elemental composition.

Workspace

The tool interface appears here.

Molar Mass Calculator: what this tool is for

The online molar mass calculator instantly computes the molecular weight (in g/mol), total atom count, and elemental mass percentage breakdown of any chemical compound from its empirical, molecular, or hydrated formula.

It incorporates official standard atomic weights recommended by IUPAC (International Union of Pure and Applied Chemistry) for all 118 elements of the periodic table, ensuring rigorous analytical accuracy for chemistry students, educators, researchers, and laboratory technicians.

The syntax engine automatically resolves functional groups enclosed in parentheses or brackets (such as (NH4)2SO4 or K4[Fe(CN)6]), as well as crystalline hydrates denoted with a dot or asterisk (such as CuSO4·5H2O or CaCl2*2H2O).

In addition to the overall molar mass, you get a detailed elemental composition table displaying each element's atomic mass, occurrence, total mass contribution, and mass percentage in the molecule.

All parsing and computations run 100% locally in your web browser: no chemical data is sent to external servers, guaranteeing zero latency and complete privacy for your work.

  • No file stored

    Nothing is saved on our servers, during or after processing.

  • Local processing

    The computation runs in your browser whenever the technology allows it.

  • Instant result

    No waiting and no export queue: the result appears live.

  • Free, no account

    No sign-up, no daily limit and no intrusive ads.

What this tool gives you

  • Official IUPAC Precision

    Calculations rely on standard IUPAC atomic weights across all 118 periodic table elements, preventing rounding drift in your stoichiometry and analytical balance weighing.

  • Full Support for Parentheses and Hydrates

    Seamlessly parses nested parentheses, coordination complex brackets, and crystal water molecules in inorganic hydrates.

  • Elemental Mass Percentage Composition

    Instantly view the percentage mass contribution of each individual element to verify elemental analysis (CHNS) or purity estimations.

  • One-Click Standard Presets

    Quickly load benchmark molecules (water, glucose, copper sulfate pentahydrate, aspirin, caffeine) to verify protocols and study chemistry fundamentals.

Real-world examples

Common chemical compounds and their exact molar masses calculated using IUPAC standard weights.

Molar masses of common laboratory substances and reagents
CompoundFormulaMolar Mass (g/mol)Major Elements by Mass
WaterH2O18.015Oxygen (88.81%), Hydrogen (11.19%)
Sodium Chloride (Table Salt)NaCl58.440Chlorine (60.66%), Sodium (39.34%)
GlucoseC6H12O6180.156Oxygen (53.29%), Carbon (40.00%)
Sulfuric AcidH2SO498.079Oxygen (65.25%), Sulfur (32.69%)
Copper(II) Sulfate PentahydrateCuSO4*5H2O249.677Oxygen (57.67%), Copper (25.45%)
Sodium BicarbonateNaHCO384.007Oxygen (57.14%), Sodium (27.37%)
Aspirin (Acetylsalicylic Acid)C9H8O4180.157Carbon (60.00%), Oxygen (35.52%)
CaffeineC8H10N4O2194.191Carbon (49.48%), Nitrogen (28.85%)

Calculating the molar mass of ammonium sulfate

Entering (NH4)2SO4 expands the two ammonium groups into 2 nitrogen atoms, 8 hydrogen atoms, 1 sulfur atom, and 4 oxygen atoms, yielding a total molar mass of 132.14 g/mol.

Accounting for crystal water in hydrates

For copper(II) sulfate pentahydrate written as CuSO4*5H2O, the calculator sums anhydrous CuSO4 (159.61 g/mol) and 5 water molecules (90.08 g/mol) for a combined mass of 249.68 g/mol.

How to use Molar Mass Calculator

  1. Enter the chemical formula

    Type the chemical formula in the input box using standard chemical capitalization (e.g., Na for sodium, not NA or na).

  2. Include subscripts and groups

    Use standard digits for atom counts (e.g., H2O) and parentheses for polyatomic ions like Ca(OH)2 or Fe2(SO4)3.

  3. Review molar mass and composition

    The total molar mass in g/mol and the full elemental percentage table update in real time as you type.

  4. Copy the summary

    Click the copy button to export the analyzed formula, molar mass, and mass fractions directly into your laboratory notebook.

Tips and mistakes to avoid

Mind chemical symbol case sensitivity

In chemistry, Co represents cobalt (58.93 g/mol), while CO represents carbon monoxide made of carbon and oxygen (28.01 g/mol).

Use an asterisk or dot for hydrates

Separate the main salt formula and water molecules with an asterisk or dot (e.g., MgSO4*7H2O or FeSO4.7H2O).

Verify the sum of mass percentages

The sum of all elemental mass percentages must equal exactly 100.00%, helping validate empirical formula derivations.

Avoid : Typing chemical symbols in all lowercase or all uppercase

Typing 'nacl' or 'NACL' instead of 'NaCl' prevents the parser from distinguishing elements like nitrogen (N) and chlorine (Cl) from sodium (Na).

Avoid : Confusing molar mass with weighed mass

Molar mass M is measured in g/mol (an intrinsic property of the chemical compound), whereas weighed mass m is measured in grams (g).

Frequently asked questions

Answers to the questions people ask about Molar Mass Calculator.

Related tools

Tools people open right after this one.

Updated on August 2026. See all tools