Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Molar Mass Calculator

Molar Mass Calculator

Calculate the molar mass of any chemical formula instantly. See the elemental breakdown with atom counts, mass contributions, and percentage composition.

Molar Mass Calculator for Any Chemical Formula

This molar mass calculator instantly finds the molar mass of any chemical compound from its formula, in grams per mole (g/mol). Type a formula like H2O, NaCl, or C6H12O6 and the result, an elemental breakdown table, and a percentage-composition bar appear as you type.

Molar mass is the mass of one mole of a substance, found by summing the standard atomic weights of every atom in the formula. For example, water (H₂O) is about 18.015 g/mol, the sum of two hydrogen atoms (2 × 1.008) and one oxygen atom (15.999). It is the number students, chemists, and lab technicians rely on for stoichiometry, solution prep, and yield calculations.

Private by design: every calculation runs in your browser, and your history is saved only to this device. Nothing you type is ever uploaded to a server.

How to Calculate Molar Mass

1

Enter a chemical formula

Type a formula into the Chemical Formula field, for example H2O, NaCl, or C6H12O6. Parentheses, hydrate dots, and bracket notation are all understood.

2

Read the result instantly

The molar mass in g/mol, the elemental breakdown table, and the composition bar update in real time with every keystroke, so there is no button to press.

3

Use the preset chips

Click any of the twelve common-formula chips, such as H₂O, NaCl, or H₂SO₄, to load and calculate it at once.

4

Reuse your history

Each formula you calculate is saved to the History panel. Click any item to recalculate it, or clear the whole list with one tap.

Supported formula notation

Notation Example Description
Simple formula H2O, NaCl, CO2 Standard chemical formulas
Parentheses Ca(OH)2, Mg3(PO4)2 Polyatomic groups with a multiplier
Hydrates CuSO4·5H2O Use · or . as the separator
Brackets [Fe(CN)6]4- Complex ions (the charge is ignored)

Features

Real-Time Calculation

The molar mass, breakdown table, and composition bar refresh on every keystroke, with no button to press.

Parentheses & Polyatomic Groups

Nested groups with multipliers are parsed correctly, so Ca(OH)2 and Mg3(PO4)2 work as written.

Hydrate Notation

Separate the water of crystallization with · or a period, such as CuSO4·5H2O, and it is added to the total.

Brackets & Charge Notation

Complex ions like [Fe(CN)6]4- are accepted; the ionic charge is ignored and only the composition counts.

Elemental Breakdown Table

Each element is listed with its symbol and name, atom count, atomic mass, total mass, and percentage of the whole.

Visual Composition Bar

A color-coded bar with a legend shows the mass share of each element at a glance.

All 118 Elements

Standard atomic weights for every element, from hydrogen to oganesson, are built in.

12 Common Presets

One-click chips for H₂O, NaCl, CO₂, H₂SO₄, NaOH, C₆H₁₂O₆, CaCO₃, C₂H₅OH, Ca(OH)₂, NH₃, HCl, and Fe₂O₃.

Calculation History

Up to 20 recent formulas are saved locally; click one to recalculate, or clear the list whenever you like.

Formatted Formula Display

Your input is echoed back with proper subscripts, so the formula reads the way it should.

Frequently Asked Questions

What is molar mass?

Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). You find it by adding up the standard atomic weights of every atom in a chemical formula. For water (H₂O) that is roughly 18.015 g/mol.

How do you calculate the molar mass of a compound?

Multiply the atomic mass of each element by how many atoms of it appear in the formula, then add the results together. This calculator does that automatically: type the formula and it sums every atom and shows the per-element contributions.

What is the unit of molar mass?

Molar mass is measured in grams per mole (g/mol). The result shown by this tool, and the atomic masses and total mass in the breakdown table, are all in g/mol.

Are molar mass and molecular weight the same thing?

In everyday use they are treated as the same. Molar mass is the mass of one mole in g/mol, while molecular weight is technically a dimensionless ratio. For molecular compounds both give the same numerical value, so this calculator works for either term.

How do I enter parentheses, subscripts, and hydrates?

Write subscripts as plain numbers after each element, for example H2O or C6H12O6. Group polyatomic ions in parentheses with a multiplier, like Ca(OH)2. For hydrates, use the middle dot (·) or a period to separate the water, such as CuSO4·5H2O or CuSO4.5H2O.

What happens to charge notation like 4- or 2+?

A charge written at the end of a formula, such as [Fe(CN)6]4-, is automatically ignored. The calculator focuses on the elemental composition, so the charge does not change the molar mass.

How accurate are the atomic masses?

The tool uses standard atomic weights for all 118 elements, in line with IUPAC values. These are precise enough for stoichiometry, solution preparation, and the vast majority of classroom and lab work.

Is my data stored anywhere?

No. Every calculation happens in your browser, and your formula history lives only in this browser's local storage. Nothing is sent to a server, and you can clear the history at any time.

Molar Mass
g/mol
Elemental Composition
Element Count Atomic Mass Total Mass %
History
Type any chemical formula and results appear instantly
Use parentheses for polyatomic groups: Ca(OH)2, Al2(SO4)3
Use · or . for hydrates: CuSO4·5H2O
Click any preset chip to quickly calculate common formulas
Click a history item to recalculate a previous formula
All calculations done locally in your browser
Want to learn more? Read documentation →
1/7
Start typing to search...
Searching...
No results found
Try searching with different keywords