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
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, , 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
Write the formula down and count each element
Take the formula you are actually testing — caffeine, , 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.
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.
Read the number as rings plus pi bonds
For benzene, , the four counts are 6, 6, 0 and 0, and the page returns:
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.
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:
Ten hydrogens, which is 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:
The numerator counts hydrogens that are missing from a reference skeleton, and the 2 in front, together with the , is that skeleton's capacity. A chain of carbons, joined by single bonds only and closed into no ring, holds 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
Written this way, each box has an obvious job in building the reference: no memorising required, only valence.
| Atom | Valence | Where it goes | What it does to the count |
|---|---|---|---|
| Carbon (C) | 4 | C box | Sets the size of the reference: hydrogens |
| Hydrogen (H) | 1 | H box | Subtracted directly — it is the hydrogens actually present |
| Nitrogen (N) | 3 | N box | Adds one hydrogen of capacity per atom, so it is added |
| Halogens: F, Cl, Br, I | 1 | One X box | Monovalent like hydrogen, so subtracted with it |
| Oxygen and other divalent atoms | 2 | No box | Cannot 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 , 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 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 or ethanol ; 1 is a single ring or a single double bond, as in cyclohexane or propene ; 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 . The first two terms are even, so the right-hand side is even exactly when 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 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, , reads 3.5 here for what is really one ring plus two double bonds. Ionic formulas such as have no meaningful value at all — there is no covalent skeleton for the count to describe.
Worked examples
From a formula to a number: caffeine
Situation: A database entry gives caffeine as and nothing else. Before drawing anything, you want to know how much unsaturation that formula is carrying.
Inputs
Result
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.
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
Result
In practice: Ten hydrogens, so the formula is — 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.
The halogen that hides in a half-integer: chloroform
Situation: Chloroform is . 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
Result
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; 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
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.
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 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.
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.
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. , glucose, gives the same 1 as , 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.
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 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.
Related Calculators
Chemical Equation Balancer
Balance a chemical reaction and get the smallest whole-number coefficients. Supports bracketed groups such as Fe(OH)3, user-supplied coefficients, and unicode subscripts.
Net Ionic Equation Calculator
Reduce a molecular equation to its net ionic form. Balances the reaction, splits soluble compounds into ions, and names the spectator ions that cancel out.
Atom Calculator
Calculate atomic properties including protons, neutrons, electrons, atomic number and mass number
Electron Configuration Calculator
Get the electron configuration for any element from the periodic table. View atomic number, atomic mass, and valence electrons.
Atomic Mass Calculator
Calculate atomic mass from protons and neutrons. Get atomic mass in various units including atomic mass units (u), kilograms, and more.
Electronegativity Calculator
Calculate electronegativity difference between two elements and determine bond type (ionic, polar covalent, or nonpolar covalent).