Molar Mass CalculatorMolecular weight of any chemical formula, element by element

Type a formula or build it by clicking the periodic table. Brackets, nested groups and hydrates all work.

Add DexoCalc as a preferred source on Google

How do you calculate molar mass?

Add the atomic weight of every atom in the formula. Multiply each element’s atomic weight by its subscript and sum the results, giving g/mol. For water, H₂O = 2 × 1.008 + 15.999 = 18.015 g/mol. For carbon dioxide, CO₂ = 12.011 + 2 × 15.999 = 44.009 g/mol.

Try:
C9H8O4
180.159g/mol

3 elements · 21 atoms

Decimals:
mol = 180.159 g

Click an element to add it to the formula. Highlighted elements are in your compound.

ElementAtomsAtomic weightSubtotal (g/mol)Mass %
Total100%

   

Mass percent by element

    The molar mass formula

    M = Σ (nᵢ × Aᵢ)n = atoms of each element in the formula · A = its standard atomic weight

    Calculating molar mass by hand

    1. Write out the formula and expand brackets: Ca(OH)₂ contains 1 Ca, 2 O and 2 H.
    2. Look up each atomic weight: Ca 40.078, O 15.999, H 1.008.
    3. Multiply and add: 40.078 + 2(15.999) + 2(1.008) = 74.092 g/mol.
    4. For hydrates, add the water: CuSO₄·5H₂O = 159.602 + 5(18.015) = 249.677 g/mol.

    Worked example: aspirin, C₉H₈O₄

    Aspirin is the calculator’s default compound, and one of the best-known compounds in medicine.

    1. Carbon: 9 × 12.011 = 108.099
    2. Hydrogen: 8 × 1.008 = 8.064
    3. Oxygen: 4 × 15.999 = 63.996
    4. Total: 108.099 + 8.064 + 63.996 = 180.159 g/mol

    So a standard 325 mg aspirin tablet contains 0.325 ÷ 180.159 = 1.80 × 10⁻³ mol, or 1.80 mmol, of acetylsalicylic acid. The grams to moles calculator does that last step for any compound.

    Molar masses of common compounds

    CompoundFormulaMolar mass (g/mol)
    WaterH2O18.015
    Oxygen gasO231.998
    Carbon dioxideCO244.009
    AmmoniaNH317.031
    Sodium chlorideNaCl58.440
    Sodium bicarbonateNaHCO384.006
    Calcium carbonateCaCO3100.086
    Sulfuric acidH2SO498.072
    EthanolC2H5OH46.069
    GlucoseC6H12O6180.156
    SucroseC12H22O11342.297
    CaffeineC8H10N4O2194.194
    ParacetamolC8H9NO2151.165
    IbuprofenC13H18O2206.285

    Molar mass, molecular weight and formula mass

    Molar massMass of one mole of a substance, in g/mol. The number used in lab calculations.
    Molecular weightRelative molecular mass: unitless, same number as molar mass, used for covalent molecules.
    Formula massSame idea for ionic compounds like NaCl, which form lattices rather than discrete molecules.

    Molar mass FAQs

    Molar mass is the mass of one mole of a substance, in grams per mole (g/mol). It equals the sum of the atomic weights of all atoms in the chemical formula. Water's molar mass is 18.015 g/mol.

    Multiply each element's atomic weight by the number of atoms of that element in the formula, then add the results. For CO2: 12.011 + 2 × 15.999 = 44.009 g/mol.

    Numerically yes. Molar mass is expressed in g/mol, while molecular weight (relative molecular mass) is a unitless ratio to one-twelfth of a carbon-12 atom. Both give 18.015 for water.

    Use parentheses or square brackets for groups, such as Ca(OH)2 or K4[Fe(CN)6]. For hydrates use a dot, an asterisk or a middle dot: CuSO4·5H2O, CuSO4.5H2O and CuSO4*5H2O all work.

    Element symbols start with a capital letter and any second letter is lower case. CO is carbon monoxide (28.010 g/mol), while Co is cobalt (58.933 g/mol).

    It uses IUPAC conventional standard atomic weights, such as 1.008 for hydrogen and 12.011 for carbon. Results can differ in the last decimal from textbooks that use rounded values like 1.0 or 12.0.

    H2O = 2 × 1.008 + 15.999 = 18.015 g/mol.

    NaCl = 22.990 + 35.45 = 58.44 g/mol.

    C6H12O6 = 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol.

    Yes, type the formula without the charge, for example SO4 for sulfate. The mass of the missing or extra electrons (about 0.00055 g/mol each) is negligible for most purposes.

    Radioactive elements with no stable isotopes, such as Tc, Pm and Po, use the mass number of their longest-lived or most common isotope, a common convention in chemistry references.

    Multiply moles by molar mass. Enter the number of moles in the calculator's mole box to get grams directly, for example 0.25 mol of NaCl × 58.44 = 14.61 g.

    Sources

    1. CIAAW / IUPAC: Standard Atomic Weights
    2. IUPAC Gold Book: Molar mass
    3. NIST: Atomic Weights and Isotopic Compositions
    4. OpenStax Chemistry 2e, Section 3.1: Formula Mass and the Mole Concept
    5. PubChem: Compound molecular weights

    This molar mass calculator uses IUPAC conventional standard atomic weights. For isotope-labelled compounds or exact monoisotopic masses (mass spectrometry), use isotope-specific values.