---
title: "Molecular Formula Finder – From Exact Mass (ppm) or Elemental Analysis | MolDraw"
url: https://www.moldraw.com/tools/free-chem-tools/molecular-formula-finder.html
description: "Find molecular formulas from an accurate mass (HRMS, [M+H]+, [M+Na]+, ppm tolerance, element limits, nitrogen rule, RDBE) or from CHN elemental analysis plus molar mass. Free, ranked by error."
lang: en
publisher: Scidart Academy
generated: 2026-11-25
---
[MolDraw](https://www.moldraw.com/) › [Chemistry tools](https://www.moldraw.com/tools/) › Molecular Formula Finder

# Molecular Formula Finder

**In short:** Find molecular formulas from an accurate mass (HRMS, [M+H]+, [M+Na]+, ppm tolerance, element limits, nitrogen rule, RDBE) or from CHN elemental analysis plus molar mass. It is free, works in your web browser and needs no download.

Turn a high-resolution mass spectrum peak or a CHN elemental analysis into candidate molecular formulas. Set the ion type, ppm tolerance and element ranges. Every candidate is checked against the RDBE and nitrogen rules and ranked by error.

**Quick answer:** m/z 195.0877 as [M+H]⁺ (5 ppm, CHNO) gives **C₈H₁₀N₄O₂** (caffeine). Elemental analysis C 40.00%, H 6.71% with M ≈ 180 gives **C₆H₁₂O₆**.

Measured m/zIon typeTolerance (ppm)

Element ranges (min–max atoms)

RDBE ≥ 0 H/C 0.2–3.1 (plausible)

## How the formula finder works

### From an accurate mass

1. **Convert the ion to the neutral mass.** Subtract the adduct: a proton (1.007276 Da) for [M+H]⁺, Na⁺ (22.989221 Da) for [M+Na]⁺. Add a proton back for [M−H]⁻.
2. **Enumerate formulas** inside your element ranges whose monoisotopic mass (¹²C = 12.000000, ¹H = 1.007825, ¹⁴N = 14.003074, ¹⁶O = 15.994915 Da…) lies within the ppm window: error (ppm) = (calculated − measured) ÷ measured × 10⁶.
3. **Apply chemical rules.** The ring-plus-double-bond equivalent (RDBE = C − H/2 − X/2 + N/2 + 1) must be a whole number ≥ 0 for a neutral, even-electron molecule. That automatically enforces the **nitrogen rule**: an odd nominal mass means an odd number of N atoms. An H/C ratio between 0.2 and 3.1 removes formulas that are possible on paper but chemically implausible.
4. **Rank by mass error.** At 5 ppm a small molecule usually has only a handful of candidates. Isotope patterns (Cl, Br, S) and fragments narrow them further.

### From elemental (CHN) analysis

Combustion analysis gives mass percentages of C, H and N (and sometimes S or halogens). Oxygen is usually taken by difference. With an approximate molar mass, for example from MS, the finder tries every formula in the mass window and keeps those whose calculated percentages all agree within ±0.4%, the usual journal acceptance limit. If you only want the simplest whole-number ratio from percentages, use the [empirical formula calculator](https://www.moldraw.com/tools/free-chem-tools/empirical-formula-calculator.html).

### Worked example

An ESI-MS peak at **m/z 195.0877** as [M+H]⁺ gives M = 194.0804 Da. Searching C, H, N and O within 5 ppm gives **C₈H₁₀N₄O₂** (caffeine, calculated [M+H]⁺ 195.08765, error ≈ −0.3 ppm, RDBE 6). The even nominal mass (194) fits the even N count (4).

**Drawing structures for your notes?** MolDraw is a free online chemical structure editor for molecules, reactions and lab diagrams.

[Open MolDraw editor](https://www.moldraw.com/)

## Frequently asked questions

### How do I find a molecular formula from an exact mass?

Enter the measured m/z, pick the ion type ([M+H]⁺, [M+Na]⁺, [M−H]⁻…) and a ppm tolerance. The finder subtracts the adduct, lists every formula within your element limits that matches to within that ppm, and removes those that break the RDBE and nitrogen rules.

### What ppm tolerance should I use?

Use 5 ppm for typical Orbitrap or Q-TOF data, or 2–3 ppm for well-calibrated instruments. Low-resolution instruments need 20 ppm or more and give many more candidates.

### What is the nitrogen rule?

A neutral organic molecule with an odd nominal mass contains an odd number of nitrogen atoms. One with an even nominal mass has zero or an even number of N.

### What is RDBE?

Ring plus double bond equivalents, the same as the degree of unsaturation: C − H/2 − X/2 + N/2 + 1. A neutral, closed-shell molecule must have a whole-number RDBE of 0 or more.

### How is this different from the empirical formula calculator?

The empirical formula calculator converts exact percentages into the simplest whole-number ratio. This finder searches for whole molecular formulas that fit measured data within experimental error, either from HRMS mass or from CHN analysis plus a molar mass, and ranks them.

### Why does the finder return several formulas?

Different formulas can have almost the same mass, especially above about 300 Da. Use a tighter ppm window, sensible element ranges, isotope patterns (Cl and Br are distinctive) and other data to decide.

## Related chemistry tools

[**How to read an NMR spectrum**Solve structures](https://www.moldraw.com/guides/how-to-read-nmr-spectrum/)[**How to read a mass spectrum**M+, isotopes](https://www.moldraw.com/guides/how-to-read-mass-spectrum/)[**Exact mass calculator**Formula → monoisotopic mass](https://www.moldraw.com/tools/free-chem-tools/exact-mass-calculator.html)[**Empirical formula calculator**% composition → formula](https://www.moldraw.com/tools/free-chem-tools/empirical-formula-calculator.html)[**Degree of unsaturation**RDBE / IHD](https://www.moldraw.com/tools/free-chem-tools/degree-of-unsaturation-calculator.html)[**Formula to structure**Candidate compounds](https://www.moldraw.com/tools/free-chem-tools/molecular-formula-to-structure.html)[**IR spectroscopy chart**Functional groups](https://www.moldraw.com/tools/free-chem-tools/ir-spectroscopy-chart.html)[**Molar mass calculator**Average molar mass](https://www.moldraw.com/tools/free-chem-tools/molar-mass-calculator.html)[**Combustion analysis calculator**CO₂ and H₂O to empirical formula](https://www.moldraw.com/tools/free-chem-tools/combustion-analysis-calculator.html)[**Isomer generator**Count and draw structural isomers](https://www.moldraw.com/tools/free-chem-tools/isomer-generator.html)

Last updated: October 11, 2026
