About Molecular Formula Calculator
A molecular formula tells you how many atoms of each element are in one molecule, while an empirical formula gives only the simplest ratio. The molecular formula is the empirical formula multiplied by a whole number n, which follows from the compound's molar mass.
This calculator takes an empirical formula and a molar mass, computes n = molar mass / empirical formula mass, and rejects results that are not close to a whole number instead of rounding blindly. Mass percentages can also be used as the starting point, with the empirical formula calculated first.
What this tool does
Two starting points
Start from an empirical formula such as CH2O, or enter mass percentages and let the tool find the empirical formula first.
Whole-number multiplier
The calculator divides the molar mass by the empirical formula mass and reports n with the rounding tolerance that was applied.
Multiplied formula
Every subscript in the empirical formula is multiplied by n, and the resulting atom counts are shown in a comparison table.
Honest rejection
When n is not within 0.15 of an integer, the result is rejected with the computed ratio so a wrong molar mass is not silently rounded into a formula.
Composition route
Mass percentages are converted to an empirical formula using the same helper as the empirical formula calculator, including normalization notes.
Worked steps
Both the empirical formula mass and the n conversion are written out, so the molecular mass can be checked against the given molar mass.
How to use Molecular Formula Calculator
- 01
Choose the starting point
Pick empirical formula if you already have one, or mass percent if you are starting from composition data.
- 02
Enter the molar mass
Type the compound's molar mass in g/mol; it is the measured or given value that determines the multiplier.
- 03
Add the formula or percentages
Type the empirical formula, or enter at least two element percentages with their symbols in the rows.
- 04
Read n and the formula
The result shows n, the empirical formula mass and the molecular formula with each subscript multiplied.
- 05
Check the working
The step panel shows the empirical formula, its mass, the division and the multiplication into the molecular formula.
How this tool works
- Works with
- EMPIRICAL → MOLECULAR
- Processing
- Client-side, in your browser. Nothing is uploaded.
- Requirements
- Chrome, Edge, Firefox or Safari · JavaScript enabled
Limitations worth knowing
- Assumes the given molar mass belongs to the same compound and is accurate enough for n to land within tolerance of an integer.
- A molecular formula is meaningful for molecular compounds; for ionic solids the empirical formula is usually the more appropriate description.
- Does not use isotope-specific masses or account for mixtures, so measured molar masses of mixtures may not resolve to a clean multiple.
Privacy and file handling
Formulas, percentages and molar masses are processed in your browser tab. Nothing is uploaded, stored or logged, and the calculator makes no network request.
Read the full privacy policy