When analyzing mass spectra, one of the first tools you can use to figure out the molecular formula of an unknown compound or answer other questions is the Nitrogen Rule.
This rule helps you quickly determine whether a molecule contains an odd or even number of nitrogen atoms.
If the m/z of the molecular ion peak is an odd number, that means the molecule contains an odd number of nitrogen atoms. If the peak is an even number, then the molecule either contains an even number of nitrogens or does not contain nitrogen at all.
In other words:
- Odd molecular ion mass → odd number of nitrogens
- Even molecular ion mass → zero or even number of nitrogens
This is because most common elements in organic compounds have even nominal masses and form an even number of bonds, while nitrogen, despite having an even mass of 14, forms an odd number of bonds.
For example, let’s compare the mass spectra of 3-methylpyridine (M = 93) and nicotine (M = 162) to see how the Nitrogen Rule applies:

In the spectrum of 3-methylpyridine, the molecular ion peak appears at m/z 93, which is an odd number. According to the Nitrogen Rule, an odd molecular ion indicates the presence of an odd number of nitrogen atoms. In this case, 3-methylpyridine contains one nitrogen atom in the aromatic ring, which perfectly aligns with the prediction. The spectrum also shows lower m/z fragment peaks, resulting from common cleavages in the pyridine ring, but the odd molecular ion provides a quick and reliable clue about nitrogen content.
In contrast, nicotine has a molecular ion peak at m/z 162, which is an even number. By the Nitrogen Rule, an even molecular ion indicates either zero or an even number of nitrogen atoms. Nicotine contains two nitrogen atoms, one in the pyridine ring and one in the pyrrolidine ring, which is consistent with the rule.
Notice also that the spectrum shows various fragment ions corresponding to cleavage of the rings and side chains, and we discuss extensively in the following two posts available to our registered students:
