Home›Calculators›Chemistry›Molar Mass Calculator

Molar Mass Calculator

Chemistry

Calculate molar mass of any compound from its elements. Select up to 3 elements and enter atom counts to get total molecular weight and percent composition.

2
1
1

Molar Mass

0
Element 1 (%)
0
Element 2 (%)
0
Element 3 (%)
0

This calculator computes your Molar Mass, Element 1 (%), Element 2 (%), Element 3 (%) from the values you enter.

Inputs
Element 1Atom Count 1Element 2Atom Count 2Element 3 (optional)Atom Count 3
Outputs
Molar MassElement 1 (%)Element 2 (%)Element 3 (%)

What is a Molar Mass?

The Molar Mass Calculator computes the molar mass of a compound from its elemental composition. Select up to three elements and enter the number of atoms of each. The calculator sums nįµ¢ Ɨ Aįµ¢ for each element and returns the total molar mass in g/mol along with the mass percentage of each element.

Molar mass is the most fundamental conversion factor in chemistry — it is the bridge between the macroscopic (grams, which you weigh on a balance) and the microscopic (moles of molecules, which you count by Avogadro's number). Without molar mass, no stoichiometric calculation is possible. For Hā‚‚O: molar mass = 2Ɨ1.008 + 15.999 = 18.015 g/mol tells you that 18 g of water contains 6.022 Ɨ 10²³ molecules. For glucose C₆H₁₂O₆: molar mass = 180.156 g/mol (the default example showing three elements).

The Percent Composition Calculator focuses on elemental percentages and serves as the complementary tool to this one — together they cover both the total mass and the distribution across elements. The Grams to Moles Calculator uses molar mass to convert measured masses to moles for reaction calculations.

How to use this Molar Mass calculator

  1. Select Element 1 from the dropdown (contains all common elements with atomic masses shown). For Hā‚‚O, select H.
  2. Enter Atom Count 1 — the subscript number in the formula. For Hā‚‚O, count = 2.
  3. Select Element 2 and enter Atom Count 2. For Hā‚‚O: O, count = 1.
  4. For three-element compounds (Hā‚‚SOā‚„, C₆H₁₂O₆): select Element 3 and enter count.
  5. Read Molar Mass in g/mol. Cross-check: Hā‚‚O ā‰ˆ 18, NaCl ā‰ˆ 58, Hā‚‚SOā‚„ ā‰ˆ 98, CaCOā‚ƒ ā‰ˆ 100.

Formula & Methodology

Molar mass from elemental composition:

M = n₁×A₁ + nā‚‚Ć—Aā‚‚ + nā‚ƒĆ—Aā‚ƒ nįµ¢ = atom count for element i Aįµ¢ = standard atomic mass (g/mol) from IUPAC 2021 table

Percent composition:

%element_i = (nįµ¢ Ɨ Aįµ¢ / M) Ɨ 100

Worked example — Aspirin (C₉Hā‚ˆOā‚„):

CƗ9, HƗ8, OƗ4 — three elements.

C: 9 Ɨ 12.011 = 108.099 H: 8 Ɨ 1.008  =   8.064 O: 4 Ɨ 15.999 =  63.996 M = 108.099 + 8.064 + 63.996 = 180.159 g/mol %C = 108.099/180.159 Ɨ 100 = 60.00% %H = 8.064/180.159 Ɨ 100   =  4.48% %O = 63.996/180.159 Ɨ 100  = 35.52%

Aspirin's molar mass of 180.16 g/mol means a 500 mg tablet contains 500/180.16 = 2.78 millimoles of aspirin. Indian generic manufacturers (including the world's largest aspirin producers in Hyderabad's pharma cluster) use this calculation for batch sheet preparation.

Frequently Asked Questions

Molar mass (M) is the mass of one mole (6.022 Ɨ 10²³ particles) of a substance, in grams per mole (g/mol). For elements, molar mass equals the standard atomic mass in grams per mole. For compounds, it is the sum of the atomic masses of all constituent atoms. Molar mass is numerically equal to molecular mass in unified atomic mass units (amu), but expressed in g/mol — for example, Hā‚‚O has molecular mass 18.015 amu and molar mass 18.015 g/mol.
Molar mass = Ī£(nįµ¢ Ɨ Aįµ¢) where nįµ¢ is the number of atoms of element i and Aįµ¢ is the standard atomic mass of element i. For Hā‚‚SOā‚„: M = 2Ɨ1.008 + 1Ɨ32.06 + 4Ɨ15.999 = 2.016 + 32.06 + 63.996 = 98.072 g/mol. For C₆H₁₂O₆ (glucose): M = 6Ɨ12.011 + 12Ɨ1.008 + 6Ɨ15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol.
Molecular mass: the mass of one molecule in atomic mass units (amu or Da). Formula mass: the mass of one formula unit (used for ionic compounds like NaCl which don't form discrete molecules) in amu. Molar mass: the mass of one mole (6.022 Ɨ 10²³ formula units) in g/mol. Numerically, all three are equal: NaCl has molecular/formula mass 58.44 amu and molar mass 58.44 g/mol. The distinction is units and context — molar mass is used in stoichiometric calculations.
Select Element 1 from the dropdown and enter its atom count. Select Element 2 and enter its count (leave as 'none' if the compound has only one element). Optionally add Element 3. The calculator returns the total molar mass and the mass percentage contribution of each element. Default: Hā‚‚O (HƗ2, OƗ1) = 18.015 g/mol.
Hā‚‚O (water): 18.015 g/mol. COā‚‚: 44.009 g/mol. NaCl: 58.44 g/mol. Hā‚‚SOā‚„: 98.072 g/mol. NaOH: 39.997 g/mol. CaCOā‚ƒ (calcium carbonate): 100.087 g/mol. C₆H₁₂O₆ (glucose): 180.156 g/mol. C₁₂Hā‚‚ā‚‚O₁₁ (sucrose): 342.297 g/mol. NHā‚ƒ (ammonia): 17.031 g/mol. HCl: 36.461 g/mol. These are among the most commonly used in NCERT and JEE stoichiometry problems.
n (moles) = m (grams) / M (g/mol). Conversely, m = n Ɨ M. For example: 98.07 g of Hā‚‚SOā‚„ = 98.07 / 98.07 = 1 mole. 500 g of NaCl = 500 / 58.44 = 8.56 moles. This conversion is the foundation of stoichiometry. The [Grams to Moles Calculator](/grams-to-moles-calculator/) and [Mole Calculator](/mole-calculator/) perform these conversions directly.
Dry air is a mixture of Nā‚‚ (78.09%), Oā‚‚ (20.95%), Ar (0.93%), and COā‚‚ (0.04%). The effective molar mass = 0.7809 Ɨ 28.014 + 0.2095 Ɨ 31.998 + 0.0093 Ɨ 39.948 + 0.0004 Ɨ 44.009 = 21.874 + 6.704 + 0.372 + 0.018 = 28.97 g/mol. Gases lighter than air (M < 28.97) are less dense than air; gases heavier than air (M > 28.97) are denser and accumulate near the floor. This is relevant to LPG vs CNG safety in Indian homes.
Yes, by several methods: (1) For gases: use M = dRT/P from the ideal gas law — the [Molar Mass of Gas Calculator](/molar-mass-of-gas-calculator/) implements this. (2) Colligative property methods — boiling point elevation or freezing point depression: M_solute = Kb Ɨ m_solute Ɨ 1000 / (Ī”Tb Ɨ m_solvent). (3) Mass spectrometry — the most precise method, measuring the mass-to-charge ratio of ionised molecules. (4) Osmometry — using the Van't Hoff osmotic pressure equation, especially for large biomolecules.
Pharmaceutical analysis in India (CDSCO guidelines, IP — Indian Pharmacopoeia) extensively uses molar mass for: preparing standard solutions (dissolving exactly nƗM grams per litre to make n mol/L), calculating drug potency (active ingredient % Ɨ dose / M = moles per dose), and interpreting HPLC results where peak areas relate to molar concentration. Quality control labs at companies like Sun Pharma, Cipla, and Dr. Reddy's routinely use molar mass in method development and release testing.
For ionic compounds, we use formula mass (not molecular mass, since no discrete molecules exist) — but the calculation is identical. CaCOā‚ƒ: M = Ca + C + 3ƗO = 40.078 + 12.011 + 3Ɨ15.999 = 40.078 + 12.011 + 47.997 = 100.086 g/mol. CaCOā‚ƒ (limestone, marble) with molar mass 100 g/mol is one of the most abundant minerals in India's Deccan Plateau and is the basis of the cement industry. The [Percent Composition Calculator](/percent-composition-calculator/) shows %Ca = 40.0%, %C = 12.0%, %O = 48.0%.