Degree of Unsaturation Calculator

Find how many rings and pi bonds an organic molecular formula allows.

Solves for C, H, N, X or DoU in any direction, with whole-number checks on every count.

Updated October 18, 2026
Frank Zhao - Creator
CreatorFrank Zhao
Loading calculator…

What the number counts

The degree of unsaturation — also called the index of hydrogen deficiency or the double bond equivalent — is one number squeezed out of a molecular formula. It counts the rings and pi bonds that formula can carry: a ring costs one unit, a double bond costs one, and a triple bond costs two.

You do not need the structure to get it, and that is the whole point. Count the carbon, hydrogen, nitrogen and halogen atoms in the formula and the arithmetic is finished. Benzene, C6H6\mathrm{C_6H_6}, comes out at 4 — exactly what its structure spends on three double bonds and one ring.

That makes it a checking number rather than a descriptive one. If a structure has been proposed for a formula, the two have to agree: a formula worth 4 units of unsaturation cannot belong to a molecule drawn with a single double bond and no ring anywhere. Students use it to test their own answers; anyone reading a formula from a mass spectrum, a combustion analysis or a database uses it to see how much unsaturation the formula is carrying before a pencil touches paper. If all you have is a percentage composition rather than a formula, turn that into a formula first with the empirical formula calculator.

C, H, N and X

Four atom counts; oxygen is deliberately not one of them

Any four of five

Leave one box empty and the page works it out

4 units

What benzene spends: three pi bonds plus one ring

Quick start

1

Write the formula down and count each element

Take the formula you are actually testing — caffeine, C8H10N4O2\mathrm{C_8H_{10}N_4O_2}, is a good one to try. Count the carbons, the hydrogens and the nitrogens, and if there are any halogens, count fluorine, chlorine, bromine and iodine together into the single X box. Oxygen, sulfur and other divalent atoms have no box at all, because they cannot change the count.

2

Type four counts, with a 0 for anything absent

The result appears once four of the five boxes hold a number, so a formula with no nitrogen and no halogen needs a 0 in both of those boxes rather than a blank. Type 8, 10, 4 and 0 into C, H, N and X and the degree of unsaturation arrives in the fifth box. Carbon and hydrogen alone are not enough: one relation cannot pin down three unknowns, so the page waits instead of guessing.

3

Read the number as rings plus pi bonds

For benzene, C6H6\mathrm{C_6H_6}, the four counts are 6, 6, 0 and 0, and the page returns:

DoU\mathrm{DoU}==2+2×6−6+0−02\frac{2 + 2 \times 6 - 6 + 0 - 0}{2}==44

Four units, which benzene spends as three pi bonds plus the ring itself. The number is a total, not a list — the page cannot tell you which of the four sits where.

4

Go the other way when the unsaturation is what you know

Every box works in both directions. Leave out exactly one count, type the other four including the degree of unsaturation, and that missing count is filled in. Caffeine again, this time without its hydrogens — 8 carbons, 4 nitrogens, no halogens, 6 units:

H\mathrm{H}==2+2×8+42 + 2 \times 8 + 4−0−2×6- 0 - 2 \times 6==1010

Ten hydrogens, which is C8H10N4O2\mathrm{C_8H_{10}N_4O_2} again. That direction is what you want when a drawing already fixes the unsaturation and the formula is quoted without one of its counts.

The formula and its rules

The whole page is one line of algebra, solved in whichever direction you leave open:

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

The numerator counts hydrogens that are missing from a reference skeleton, and the 2 in front, together with the 2 C2\,\mathrm{C}, is that skeleton's capacity. A chain of C\mathrm{C} carbons, joined by single bonds only and closed into no ring, holds 2 C+22\,\mathrm{C} + 2 hydrogens. Close one ring, or replace one single bond with a double bond, and the same carbons can carry two hydrogens fewer. Dividing by two turns "two hydrogens missing" into "one unit of unsaturation".

The same equation, written as missing hydrogens

Href\mathrm{H_{ref}}==2+2 C+N−X2 + 2\,\mathrm{C} + \mathrm{N} - \mathrm{X}
DoU\mathrm{DoU}==Href−H2\frac{\mathrm{H_{ref}} - \mathrm{H}}{2}

Written this way, each box has an obvious job in building the reference: no memorising required, only valence.

AtomValenceWhere it goesWhat it does to the count
Carbon (C)4C boxSets the size of the reference: 2 C+22\,\mathrm{C} + 2 hydrogens
Hydrogen (H)1H boxSubtracted directly — it is the hydrogens actually present
Nitrogen (N)3N boxAdds one hydrogen of capacity per atom, so it is added
Halogens: F, Cl, Br, I1One X boxMonovalent like hydrogen, so subtracted with it
Oxygen and other divalent atoms2No boxCannot change the hydrogen count, so it cancels out

The halogen line is the one people trip over. A halogen does not create unsaturation on its own — swap a hydrogen for a chlorine and the degree of unsaturation does not move — but it occupies a position a hydrogen could have occupied, so it has to sit on the same side of the subtraction as hydrogen. What the numerator really measures is H+X\mathrm{H} + \mathrm{X}, the monovalent atoms standing on the skeleton, against the reference ceiling.

One unit, several possible structures

A degree of unsaturation of 4 describes benzene, but it does not prove benzene. The same 4 is satisfied by four separate double bonds, by two triple bonds, by two rings with two double bonds, or by one ring with three double bonds. The arithmetic does not prefer a ring to a pi bond, and C4H6\mathrm{C_4H_6} is the classroom illustration: buta-1,3-diene (two double bonds), but-1-yne (one triple bond) and cyclobutene (one ring and one double bond) all give 2.

Reading the number in practice: 0 means no rings and no pi bonds at all, as in hexane C6H14\mathrm{C_6H_{14}} or ethanol C2H6O\mathrm{C_2H_6O}; 1 is a single ring or a single double bond, as in cyclohexane C6H12\mathrm{C_6H_{12}} or propene C3H6\mathrm{C_3H_6}; 2 covers anything totalling two, including two rings in a fused or bridged system; and a larger number is simply a larger total, to be allocated by evidence rather than by the count.

Why a half can appear

Doubling the formula gives 2 DoU=2+2 C+N−H−X2\,\mathrm{DoU} = 2 + 2\,\mathrm{C} + \mathrm{N} - \mathrm{H} - \mathrm{X}. The first two terms are even, so the right-hand side is even exactly when N+H+X\mathrm{N} + \mathrm{H} + \mathrm{X} is even. When that sum is odd the degree of unsaturation is a half-integer, and for a neutral molecule that is always informative: either the species has an unpaired electron, as the methyl radical CH3∙\mathrm{CH_3^{\bullet}} does with its 0.5, or one of the counts is wrong — most often a halogen left out. The page prints the half rather than rounding it, because 1.5 is the clue and 2 would be the mistake.

What this bookkeeping assumes

A neutral molecule built from whole atoms of C, H, N and halogens. Charged species and radicals need the charge handled separately, which is why their counts come out as halves: the cyclopentadienyl ion, C5H5−\mathrm{C_5H_5^{-}}, reads 3.5 here for what is really one ring plus two double bonds. Ionic formulas such as NaCl\mathrm{NaCl} have no meaningful value at all — there is no covalent skeleton for the count to describe.

Worked examples

1

From a formula to a number: caffeine

Situation: A database entry gives caffeine as C8H10N4O2\mathrm{C_8H_{10}N_4O_2} and nothing else. Before drawing anything, you want to know how much unsaturation that formula is carrying.

Inputs

Carbon (C)8
Hydrogen (H)10
Nitrogen (N)4
Halogens (X)0

Result

DoU\mathrm{DoU}==2+2×8−10+4−02\frac{2 + 2 \times 8 - 10 + 4 - 0}{2}==122\frac{12}{2}==66

In practice: Six units, and caffeine's structure accounts for all six: two fused rings and four double bonds — two carbonyls, one C=C and one C=N. A structure drawn with fewer is not caffeine, however plausible it looks.

2

From a number back to the formula: the hydrogen count

Situation: You know the target skeleton — 8 carbons, 4 nitrogens, no halogens, two rings and four double bonds — and need the hydrogen count the formula has to carry.

Inputs

Carbon (C)8
Nitrogen (N)4
Halogens (X)0
Degree of unsaturation (DoU)6

Result

H\mathrm{H}==2+2×8+42 + 2 \times 8 + 4−0−2×6- 0 - 2 \times 6==1010

In practice: Ten hydrogens, so the formula is C8H10N4O2\mathrm{C_8H_{10}N_4O_2} — caffeine again. This is the direction to reach for when a proposed structure fixes the unsaturation but the quoted formula is missing one of its counts.

3

The halogen that hides in a half-integer: chloroform

Situation: Chloroform is CHCl3\mathrm{CHCl_3}. Carbon 1 and hydrogen 1 go in, the halogen box is left at zero, and the page answers 1.5 — a number no neutral molecule can have.

Inputs

Carbon (C)1
Hydrogen (H)1
Nitrogen (N)0
Halogens (X)0, then 3

Result

X=0: 2+2−1−02\text{X} = 0:\ \frac{2 + 2 - 1 - 0}{2}==1.51.5\qquadX=3: 2+2−1−32\text{X} = 3:\ \frac{2 + 2 - 1 - 3}{2}==00

In practice: Chloroform is fully saturated: no rings, no double bonds, 0 units. The missing three chlorines were the whole difference, which is why every halogen goes into that one X box before you subtract.

Five habits that prevent wrong answers

Cross-check the formula against the drawing

Once a structure exists, count its rings and its double bonds — a triple bond counts twice — and compare that total with the number the formula gave. A mismatch means either the drawing or the formula is wrong, and that single check catches more errors than re-reading either one on its own.

Add every halogen into the single X box

Fluorine, chlorine, bromine and iodine go in together. Leaving them out does not just change the count — it usually turns a whole number into a half, which is exactly the signal you want to notice before you commit to an answer.

Treat a half-integer as a flag, not a result

For a neutral formula, a half means the species is a radical or a count is wrong. Check the halogens first, then the nitrogens, then whether the question is really about a neutral molecule at all.

Do not read the number as a structure

It says how much unsaturation there is, never where it is. An infrared spectrum separates carbonyls from C=C, and hydrogenation or NMR counts how much is really there; C4H6\mathrm{C_4H_6} is buta-1,3-diene, but-1-yne or cyclobutene depending on evidence this count cannot supply.

Keep the formula beside the number

A degree of unsaturation on its own is unreadable six months later, and it belongs to the formula rather than to the compound — every isomer shares it. Write down the formula as you counted it, note whether it was the neutral molecule, and note which element you left for the page to solve. If the formula came from a measured mass, check that it is the formula the mass belongs to with the molecular weight calculator before trusting the count.

Questions

Q

Why does nothing happen when I type only carbon and hydrogen?

Because four of the five boxes have to hold a number. The page works from one relation between C, H, N, X and the degree of unsaturation; with two counts and three unknowns there is nothing to pin the missing ones down, so it stays quiet rather than inventing a value. Add a 0 for nitrogen and a 0 for halogens — most formulas need both — and the answer appears.

Q

My answer is 1.5. Is that a bug?

No, it is the formula being honest. A half-integer appears whenever the total of hydrogens, halogens and nitrogens is odd, and for a neutral closed-shell molecule that cannot happen. The usual causes are a halogen that was not counted — chloroform CHCl3\mathrm{CHCl_3} reads 1.5 with the chlorines left out and 0 with them counted — or a species with an unpaired electron, such as the methyl radical, whose real answer is 0.5.

Q

Can the result be negative?

Not in any physical sense — there is no such thing as minus one ring. A negative result is a flag: the counts describe no molecule at all. Six carbons with no hydrogens, no nitrogen and no halogens already reach 7 units by themselves, so asking for 8 forces the halogen box to −2. The page keeps that −2 on screen, in red, with the message naming the box — which tells you where the impossible part of the input is rather than just refusing the calculation.

Q

Does oxygen really not matter?

Not for this count. Oxygen is divalent: slide one into a carbon–hydrogen bond and the hydrogen count, the ring count and the number of pi bonds are all unchanged, so it drops out of the numerator. C6H12O6\mathrm{C_6H_{12}O_6}, glucose, gives the same 1 as C6H12\mathrm{C_6H_{12}}, cyclohexane — that single unit is the glucose ring, and its six oxygens contribute nothing to it. The same cancellation applies to other divalent atoms inside a chain, sulfur included.

Q

Is this the same as double bond equivalents?

Yes. Degree of unsaturation, index of hydrogen deficiency, double bond equivalent and unsaturation index are names for the same count, so a value you find quoted under any of them can be compared with this one directly. The different names mostly tell you which textbook or database the number came out of.

Where the number stops

  • It is built for a neutral covalent molecular formula. Salts, coordination compounds and the repeat unit of a polymer sit outside it: an ionic formula such as NaCl\mathrm{NaCl} has no covalent skeleton to count, and a polymer subscript describes one repeat unit rather than the material.
  • Rings and pi bonds share one unit. A value of 3 can mean three double bonds, a ring with two double bonds, or two fused rings with one double bond. The number is a total, and allocating it is a separate piece of work that needs spectra or chemistry, not arithmetic.
  • Impossible values are flagged, not corrected. Atom counts must be whole numbers, every count must be zero or more, and a result that needs a negative count stays visible in red with an explanation instead of quietly changing your input. Counts above a million atoms are flagged as well, since the usual cause is a misplaced decimal point or a molar mass typed into an atom box.
  • It is formula bookkeeping, not structure determination. The result supports coursework, exam checking and a sanity check before a structure is drawn; it is not a measurement. For a structure you intend to rely on, confirm it with infrared, NMR, mass spectrometry or crystallography, and have the assignment reviewed by the chemist or instructor responsible for it.
Degree of Unsaturation Calculator - Rings and Pi Bonds from a Formula