Molar Mass from Formula
Last reviewed: January 2026
A chemical equation balancer calculates molar masses and helps balance chemical formulas by computing the molecular weight of compounds from their chemical formula. It is a reference tool for chemistry students working with stoichiometry and reaction equations.
Molar mass is the mass of one mole (6.022 × 10²³ particles) of a substance, expressed in grams per mole. It is calculated by summing the atomic masses of every atom in the chemical formula — for example, water (H₂O) has a molar mass of 2(1.008) + 15.999 = 18.015 g/mol.[1] Molar mass is essential for stoichiometry, the branch of chemistry that determines the proportions of reactants and products in chemical reactions.[2] Balancing a chemical equation ensures that the number of atoms of each element is equal on both sides, reflecting the law of conservation of mass.[3] Use the Dilution Calculator for solution preparation calculations.
| Compound | Formula | Molar Mass (g/mol) |
|---|---|---|
| Water | H₂O | 18.015 |
| Carbon dioxide | CO₂ | 44.009 |
| Sodium chloride | NaCl | 58.443 |
| Glucose | C₆H₁₂O₆ | 180.156 |
| Sulfuric acid | H₂SO₄ | 98.079 |
| Ethanol | C₂H₅OH | 46.069 |
The law of conservation of mass — one of the fundamental laws of chemistry — states that matter cannot be created or destroyed in a chemical reaction. This means every atom present in the reactants must appear in the products, and a balanced equation ensures this accounting is correct. An unbalanced equation like H₂ + O₂ → H₂O is mathematically inconsistent: it shows 2 hydrogen atoms and 2 oxygen atoms on the left but only 2 hydrogen and 1 oxygen on the right. The balanced version, 2H₂ + O₂ → 2H₂O, shows 4 hydrogen and 2 oxygen atoms on both sides. Balanced equations are essential for calculating how much of each reactant is needed and how much product will be formed — the foundation of stoichiometry used in laboratories, industrial chemistry, and pharmaceutical manufacturing. For related calculations, see our Molar Mass Calculator.
The most common approach is balancing by inspection (trial and error), following a systematic order. Start by listing all elements present and their counts on each side. Balance elements that appear in only one reactant and one product first — these are the least constrained. Save hydrogen and oxygen for last because they typically appear in multiple compounds. Adjust coefficients (the numbers in front of chemical formulas) rather than subscripts (the numbers within formulas — changing subscripts changes the substance itself). Work with whole numbers, and if you end up with fractions, multiply all coefficients by the smallest common denominator to clear them.
For more complex equations, the algebraic method provides a systematic approach. Assign variables (a, b, c...) to each coefficient, set up a system of equations representing the atom count for each element, and solve the system. For example, aFe₂O₃ + bCO → cFe + dCO₂: Iron gives 2a = c, Oxygen gives 3a + b = 2d, Carbon gives b = d. Setting a = 1: c = 2, and from oxygen: 3 + b = 2b (since b = d), giving b = 3, d = 3. So Fe₂O₃ + 3CO → 2Fe + 3CO₂. The algebraic method always works regardless of complexity and is particularly useful for redox reactions with multiple oxidation state changes. For systems of equations, see our Equation Solver.
| Reaction Type | General Form | Example (Balanced) |
|---|---|---|
| Synthesis | A + B → AB | 2Na + Cl₂ → 2NaCl |
| Decomposition | AB → A + B | 2H₂O₂ → 2H₂O + O₂ |
| Single replacement | A + BC → AC + B | Zn + 2HCl → ZnCl₂ + H₂ |
| Double replacement | AB + CD → AD + CB | AgNO₃ + NaCl → AgCl + NaNO₃ |
| Combustion | CₓHᵧ + O₂ → CO₂ + H₂O | CH₄ + 2O₂ → CO₂ + 2H₂O |
| Acid-base | Acid + Base → Salt + H₂O | HCl + NaOH → NaCl + H₂O |
A balanced equation provides mole ratios that govern all quantitative chemistry. In 2H₂ + O₂ → 2H₂O, the coefficients tell us 2 moles of hydrogen react with 1 mole of oxygen to produce 2 moles of water. These ratios scale linearly: 4 moles of H₂ require 2 moles of O₂ to produce 4 moles of H₂O. To convert between moles and grams, use molar masses: 1 mole of O₂ = 32.00g, 1 mole of H₂ = 2.016g, 1 mole of H₂O = 18.015g. So producing 36.03g of water (2 moles) requires 4.032g of hydrogen and 32.00g of oxygen — a total reactant mass of 36.032g, matching the product mass (conservation of mass confirmed).
The limiting reagent is the reactant that runs out first, determining the maximum amount of product. If you have 10 moles of H₂ and 4 moles of O₂, the hydrogen can react with at most 5 moles of O₂ (based on the 2:1 ratio), but you only have 4 moles of O₂. Oxygen is the limiting reagent — it limits production to 8 moles of water, leaving 2 moles of excess hydrogen unreacted. Theoretical yield is the maximum product assuming complete reaction of the limiting reagent; actual yield is what you obtain in practice (always less due to side reactions, incomplete reaction, and purification losses). Percent yield = (actual yield / theoretical yield) × 100. Industrial processes optimize percent yield through temperature, pressure, catalysts, and excess reagent strategies. Calculate measurement precision with our Percent Error Calculator.
Oxidation-reduction (redox) reactions involve the transfer of electrons between species and are among the most challenging equations to balance. The half-reaction method separates oxidation and reduction into individual half-reactions, balances each independently, then combines them. For each half-reaction: balance atoms other than O and H, balance O by adding H₂O, balance H by adding H⁺ (or OH⁻ in basic solution), balance charge by adding electrons, then multiply half-reactions so electron counts match and add them together, canceling species that appear on both sides.
For example, balancing MnO₄⁻ + Fe²⁺ → Mn²⁺ + Fe³⁺ in acidic solution: Reduction half-reaction: MnO₄⁻ + 8H⁺ + 5e⁻ → Mn²⁺ + 4H₂O. Oxidation half-reaction: Fe²⁺ → Fe³⁺ + e⁻. Multiply oxidation by 5 to match electrons: 5Fe²⁺ → 5Fe³⁺ + 5e⁻. Combined: MnO₄⁻ + 8H⁺ + 5Fe²⁺ → Mn²⁺ + 4H₂O + 5Fe³⁺. Verify: Mn balanced (1=1), O balanced (4=4), H balanced (8=8), Fe balanced (5=5), charge balanced (−1+8+10 = 17 left; +2+0+15 = 17 right). Redox reactions are the basis of electrochemistry, batteries, corrosion, metabolic energy production, and industrial processes like metal smelting and water treatment. For related science calculations, see our Radioactive Decay Calculator and pH Calculator.
Balancing chemical equations is a direct application of the Law of Conservation of Mass — atoms cannot be created or destroyed in a chemical reaction. Every atom present in the reactants must appear in the products. This means if you start with 2 hydrogen atoms and 1 oxygen atom on the left side, you must have exactly 2 hydrogen atoms and 1 oxygen atom on the right side. In industrial chemistry, balanced equations determine stoichiometric ratios for manufacturing — getting the proportions wrong wastes expensive reagents or produces dangerous byproducts. Use our Interactive Periodic Table to look up atomic masses needed for mass-based calculations.
See also: Ideal Gas Law Calculator · pH Calculator · Half-Life Decay Calculator
→ Balance metals first, then nonmetals, then hydrogen, then oxygen. This order works for most reactions. Oxygen and hydrogen often appear in multiple compounds, so saving them for last reduces the number of adjustments needed.
→ Polyatomic ions can be balanced as units. If a polyatomic ion appears intact on both sides of the equation, treat it as a single unit rather than balancing its component atoms separately. This simplifies the process significantly for ionic reactions.
→ Combustion reactions follow a pattern. Hydrocarbon + O₂ → CO₂ + H₂O. Balance carbon first (match C atoms in CO₂ to the hydrocarbon), then hydrogen (match H atoms in H₂O), then oxygen last. This works for every combustion reaction. See our Molar Mass Calculator for stoichiometry.
→ Redox reactions require half-reaction balancing. For reactions involving electron transfer (oxidation-reduction), the inspection method often fails. Split into oxidation and reduction half-reactions, balance electrons, then combine. Our Scientific Calculator can help with the arithmetic.
See also: Molar Mass Calculator · Periodic Table · Scientific Calculator · Concentration Calculator