Compounds · Chemistry

Molar Mass & Percent Composition Calculator

Parse a chemical formula to calculate molar mass, atom counts, and each element’s mass percentage.

Formula shown Runs locally Reviewed Aug 11, 2026
Follow us on Google
Equation guide

Chemical formula and standard atomic weights

Molar mass

M = Σ(nᵢAᵢ)

Element mass percentage

mass %ᵢ = nᵢAᵢ/M × 100
Formula parser

Analyze a chemical compound

How to write a formula
  • Use the element symbol with exact capitalization: NaCl, not NACL or nacl.
  • Type subscripts as ordinary numbers immediately after the element: H2O, CO2.
  • Use parentheses for repeated groups: Ca(OH)2 or (NH4)2SO4.
  • For hydrates, separate the parts with a middle dot or period and include the coefficient: CuSO4·5H2O.

Do not enter state symbols, charges, reaction coefficients, or equations. Atomic weights and percentages are displayed with at most three decimals.

Σ nᵢAᵢ

Molar mass and percent composition will appear here.

Using the model

Symbols, assumptions and limitations

Interpretation notes

Standard atomic weights are used. Parentheses and hydrate notation with a middle dot are supported. Element subscripts, group multipliers, and hydrate multipliers must be positive whole numbers.

Worked examples

See the method in practice

01

Calcium hydroxide

Ca(OH)₂ contains one Ca, two O, and two H atoms per formula unit.

02

Copper sulfate pentahydrate

CuSO₄·5H₂O includes five waters of hydration in its molar mass.

Questions

Frequently asked

Can I use parentheses?

Yes. Formulas such as Ca(OH)2 are expanded before the mass is calculated.

Why can atomic weights vary slightly?

Natural isotopic composition varies; this tool uses conventional standard atomic weights suitable for classroom calculations.

Sources & review

Equations and examples are checked against the references below. Results are educational and should be independently verified for safety-critical work.

IUPAC periodic table of the elements

Written by the STEM Hub editorial team · Reviewed August 11, 2026 · Review methodology