ToolFeather
CalculatorsRuns in your browser

Molar Mass Calculator

Type a chemical formula to get its molar mass in g/mol, the mass percentage of each element, and an instant grams ↔ moles conversion — brackets and hydrates included.

Quick presets

Molar Mass Calculator

Chemical formula

Case matters (Co is cobalt, CO is carbon monoxide). Use ( ) or [ ] for groups and · or * for hydrates, e.g. Fe2(SO4)3 or Na2CO3·10H2O.

grams
moles
    Molar mass
    –
    g/mol
    Atoms per formula unit
    –
     
    Mass composition
    Breakdown

    Runs in your browser — nothing you enter is uploaded or stored.

    ToolFeather · g/mol + composition
    Scratchpad auto-saved
    Stored in this browser (localStorage)
    Step-by-step~40s read

    How it works — in four simple steps

    No signup and nothing to install — it all runs in your browser.

    1

    Type the formula

    Use correct capitals; subscripts are just numbers (H2SO4).

    2

    Read the molar mass

    The total in g/mol updates instantly.

    3

    Check the composition

    See each element's atoms, mass contribution and percentage.

    4

    Convert

    Enter grams to get moles and molecules, or moles to get grams.

    Pro tip

    Case matters: Co is cobalt, CO is carbon monoxide.

    Features

    Brackets and hydrates

    Nested ( ), [ ] and { } groups and ·/* hydrates like Na₂CO₃·10H₂O.

    Mass percent composition

    A breakdown table and donut chart of each element's share of the mass.

    Grams ↔ moles

    Convert a mass to moles and number of molecules, or moles to grams.

    CIAAW 2024 atomic weights

    The same standard atomic weights as IUPAC's current periodic table.

    Clear errors

    Unknown symbols and unmatched brackets are pointed out — including the classic Co vs CO mix-up.

    About the Molar Mass Calculator

    The molar mass of a compound is the sum of the atomic weights of the atoms in its formula, expressed in grams per mole. For water, H₂O: 2 × 1.0080 + 15.999 = 18.015 g/mol. One mole contains the Avogadro number of formula units, exactly 6.02214076 × 10²³ since the 2019 SI redefinition.

    The calculator parses the formula as you type: element symbols (case matters), numbers, nested brackets such as Fe₂(SO₄)₃ or K₄[Fe(CN)₆], and hydrates written with a dot or asterisk, like CuSO₄·5H₂O. It uses the standard atomic weights published by CIAAW in 2024 (abridged values — the precision periodic tables and textbooks use); radioactive elements without a standard weight use the mass number of their most stable isotope and are marked.

    Below the result, the mass composition shows how much of the compound's mass each element contributes — useful for empirical-formula problems and fertiliser or alloy calculations — and the converter turns a mass in grams into moles and number of molecules, or back.

    Examples

    H2O → 18.015 g/mol (H 11.19%, O 88.81%)
    C6H12O6 (glucose) → 180.16 g/mol
    CuSO4·5H2O → 249.68 g/mol

    Frequently asked questions

    5 answers
    What is molar mass?
    The mass of one mole of a substance, in grams per mole (g/mol). Numerically it equals the substance's average molecular or formula mass in daltons (u).
    How do I calculate molar mass?
    Multiply each element's atomic weight by the number of its atoms in the formula and add them up. For CO₂: 12.011 + 2 × 15.999 = 44.009 g/mol.
    Is molar mass the same as molecular weight?
    In practice they're the same number. Strictly, molecular weight (relative molecular mass) is dimensionless, while molar mass has units of g/mol.
    How do I enter a hydrate?
    Separate the water with a dot or asterisk and a coefficient: CuSO4·5H2O or CuSO4*5H2O.
    Why might my textbook give a slightly different value?
    Textbooks use different roundings of the atomic weights (for example H = 1.008 or 1.01). This calculator uses CIAAW's 2024 abridged standard atomic weights.