Degrees of Unsaturation Calculator

The degrees of unsaturation — also called the index of hydrogen deficiency (IHD) — is a single integer that tells you how many rings plus π-bonds a molecule contains before you’ve drawn a single line. Given a molecular formula, one line of arithmetic returns the answer, and one look at that number tells you whether to reach for benzene, whether to expect a carbonyl, or whether the compound is fully saturated. It is the first thing every ochem student learns after Lewis structures because it prunes the structure-elucidation problem so aggressively.

Degrees of Unsaturation Calculator

Enter a molecular formula (Hill notation, e.g. C6H6, C9H8O4) or the atom counts directly. Halogens count as hydrogen; oxygen and sulfur are ignored; each degree corresponds to one ring or one π-bond.

Input mode

Try: , , , .

Equation used

Each degree = one ring OR one π-bond. Halogens count as H, O and S are ignored, and every N contributes +1 (Clayden 2e §3; McMurry 9e §7.2; IUPAC Gold Book "index of hydrogen deficiency").

The formula

For a molecule containing C carbons, H hydrogens, N nitrogens, O oxygens, and X halogens (F, Cl, Br, I combined):

DoU=2C+2+N−H−X2\text{DoU} = \frac{2C + 2 + N - H - X}{2}

The derivation starts from the saturated open-chain reference: an alkane with C carbons has 2C + 2 hydrogens. Replace each H with an X (halogen) and the count doesn’t change — halogens are monovalent and occupy a bond slot exactly like hydrogen. Each nitrogen is trivalent, so inserting one adds one extra H-equivalent to the reference (hence the +N term). Divalent oxygen and sulfur slot between two existing bonds without changing hydrogen count, so they don’t appear.

Every degree corresponds to one ring OR one π-bond. Benzene (C₆H₆) has DoU = 4, and every ochem student learns to read that as “1 ring + 3 π-bonds” instantly. Naphthalene (C₁₀H₈) has DoU = 7 — two fused 6-membered rings plus five π-bonds (each ring shares one C=C pair).

Worked example — aspirin

Aspirin is C₉H₈O₄. What does that predict?

Worked example — DoU of aspirin
Molecular formula
C₉H₈O₄
C
9
H
8
N, X
0
O
4 (ignored)
  1. Formula
  2. Substitute
  3. Note

    Six degrees decompose as: a benzene ring (4 = 1 ring + 3 π-bonds) plus an ester carbonyl (1 π) plus a carboxylic-acid carbonyl (1 π). Notice how the four oxygens in the formula dropped out of the arithmetic entirely — they contribute to the mass but not to DoU.

  4. Result

Worked example — caffeine

Caffeine is C₈H₁₀N₄O₂.

DoU=2(8)+2+4−10−02=122=6\text{DoU} = \frac{2(8) + 2 + 4 - 10 - 0}{2} = \frac{12}{2} = 6

The +4 from four nitrogens exactly cancels the two extra Hs (10 vs 8 for aspirin), giving the same DoU. Caffeine’s six degrees are 2 fused rings + 4 π-bonds (one imidazole aromatic π + two C=O + one imidazole ring π=one of the ring’s C=C).

When it goes half-integer

If you compute DoU and get 0.5 or 1.5, one of two things is true:

  • The formula is wrong. Recount hydrogens first — off-by-one on H is the most common textbook typo.
  • The compound is a radical, i.e. it has an odd number of unpaired electrons. Methyl radical CH₃• is the textbook case: 2(1) + 2 − 3 = 1, DoU = 0.5. Neutral closed-shell molecules always give integer DoU.

Charged species (cations and anions) are also common half-integer traps — adjust the formal H count to the neutral parent before applying the equation.

Common pitfalls

  • Halogens count as hydrogens, not as heteroatoms. DDT (C₁₄H₉Cl₅) has DoU = (28 + 2 − 9 − 5)/2 = 8, consistent with two benzene rings (2 × 4).
  • Nitrogen count matters. Every N adds +1 to the numerator. Aniline C₆H₇N has DoU = (12 + 2 + 1 − 7)/2 = 4, still one benzene ring — nitrogen doesn’t add unsaturation on its own.
  • Divalent S is invisible. Thiols, sulfides, and sulfoxides all give the same DoU regardless of S count; a sulfone S=O double bond would still not be captured by this counting rule.
  • This is not a formal-charge check. DoU won’t tell you where the unsaturation is — only how many degrees there are in total.

Frequently asked questions

Why do halogens count as hydrogen?
Halogens are monovalent — they occupy exactly one bonding position on a carbon, just like a hydrogen atom. In the derivation of the DoU formula from the saturated open-chain reference CₙH₂ₙ₊₂, replacing an H with an F, Cl, Br, or I doesn't change the bonding count, so a halogen and a hydrogen are interchangeable for the purpose of counting missing hydrogens. Chloroform CHCl₃ therefore has DoU = 0 (fully saturated, no rings, no π-bonds), the same as methane CH₄.
Why does oxygen have no effect on DoU?
Oxygen is divalent and inserts into an existing C–H or C–C bond without changing the overall H-count of a saturated reference. Compare ethane C₂H₆ to ethanol C₂H₆O: the O sits between C and H (or between two Cs), no hydrogens gained or lost. Sulfur behaves the same way for the same reason. Any O or S atoms in the formula can be ignored — DoU(C₂H₆O) = DoU(C₂H₆) = 0.
What if the answer is a half-integer?
Either the formula is wrong (miscounted an H or a halogen) or the compound is a radical — an odd number of unpaired electrons. Stable neutral CHNO molecules always have DoU as a non-negative integer. If you get 0.5, 1.5, 2.5… recount hydrogens first; the second most common cause is treating a charged species as neutral. The calculator flags half-integers with a warning.
Does DoU tell me if the molecule has a ring?
It tells you the *sum* of rings plus π-bonds, but not the split. Benzene (DoU = 4) is 1 ring + 3 π-bonds; cyclohexene (DoU = 2) is 1 ring + 1 π. A DoU of 4 or more is a very strong hint that at least one benzene ring is present — that fingerprint is why every ochem student learns the formula in their first month. For a definitive assignment you need extra data (NMR, IR, or a proposed structure).
How does this generalise to boron, phosphorus, silicon?
Silicon is tetravalent like carbon and contributes +2 per atom, so this calculator counts it that way. Phosphorus in most organics is trivalent like nitrogen (+1 per atom). Boron in neutral BR₃ species is trivalent but contributes −1 to the numerator because it's short one electron pair relative to the reference (March's Advanced Organic Chemistry 8e §1.C). If you have those atoms, use counts mode and add the contribution by hand — the calculator currently only counts C/H/N/O/S/X/Si.

Sources

  • Clayden, Greeves & Warren, Organic Chemistry, 2nd ed. (2012), §3 — 'How to work out what compound you have'
  • McMurry, Organic Chemistry, 9th ed. (2016), §7.2 — Degree of Unsaturation
  • Vollhardt & Schore, Organic Chemistry: Structure and Function, 8th ed. (2018), §11.7
  • IUPAC Gold Book — index of hydrogen deficiency
  • March's Advanced Organic Chemistry, 8th ed. (2020), §1.C — heteroatom generalisations

Last updated: .