To name a hydrocarbon, you must

As long as you can do each step individually, putting it all together isn’t that hard. It does require practice, though.

Main chain

[prefix]ane, where prefix represents the number of carbon atoms in the main chain (see the table below)
#-[prefix]ene, #,#-[prefix]diene, #,#,#-[prefix]triene, etc., where each # represents the location of a double bond and the part in bold indicates the number of double bonds
like alkenes, but ending in yne instead of ene
like alkanes/alkenes/alkynes, but add cyclo before the prefix
always benzene
Prefix atoms
meth 1
eth 2
prop 3
but 4
pent 5
hex 6
hept 7
oct 8
non 9
dec 10

Side branches

Side branches (alkyl groups) are named like #-[prefix]yl, #,#-di[prefix]yl, etc., where prefix is the number of carbon atoms in the branch, each # represents the location of the branch on the main chain, and the part in bold indicates the number of this type of branch.

Propyl and butyl groups have non-systematic names for their isomers:

Structural isomers of propyl and butyl

If there are two side branches coming off an aromatic, a classical method can be used instead of numbers: ortho or o- means 1,2; meta or m- means 1,3; and para or p- means 1,4. For example, 1,4-diethylbenzene is the same as p-diethylbenzene.

There are special names for branches that aren’t alkyl groups:

Branch Name
benzene phenyl
F fluoro
Cl chloro
Br bromo
I iodo
NO2 nitro
NH2 amino
OH hydroxy