Empirical & Molecular Formula Calculator
Enter element amounts (grams or %) and optionally molar mass to get both formulas with steps.
🎯 Neumorphism UI
🧪 Offline, single-file
📱 Responsive
For % mode, calculator assumes 100 g sample.
Add rows for elements. Symbols are case‑sensitive (C, H, O, Na, Cl...). Press Enter in any field to calculate.
Empirical Formula
—
Molar mass: —
Molecular Formula
—
Provide compound molar mass to compute.
Step‑by‑Step
Enter values and click Calculate to see steps.
Element Details
Atomic weights are standard values (g/mol). Minor differences by source may occur.
| Element | Atomic wt | Mass | Moles | Ratio | Rounded |
|---|
Pro tip: If a ratio is close to .5, .33, .25, .66, the calculator scales all subscripts to get whole numbers.
ℹ️ Explanation & References
🧪 Empirical formula shows the simplest whole-number ratio of elements (e.g., glucose C₆H₁₂O₆ → CH₂O).
🧫 Molecular formula shows the actual count of atoms in a molecule. You need the compound molar mass to get this.
How to use
- Choose Percent or Mass in grams. For %, a 100 g sample is assumed.
- Enter element symbols and values, then click Calculate.
- See moles, ratios, rounding and the empirical formula. Add the compound molar mass to get the molecular formula.
Steps used by this tool
- Convert input to moles: mass ÷ atomic weight.
- Divide all mole values by the smallest to get a ratio.
- If needed, multiply ratios by 2–6 to clear fractions like 1/2, 1/3, 2/3.
- Write the empirical formula with whole-number subscripts.
- If molar mass is given, compute n = Mcompound / Mempirical and scale to get the molecular formula.
