The 4n+2 rule, also known as the Hückel’s rule, is the required number of delocalized electrons in a cyclic, planar, a fully conjugated molecule to make it aromatic.
For example, let’s see how the 4n + 2 rule is used to classify benzene as an aromatic compound. It has three fully conjugated π bonds which accounts for six delocalized p electrons therefore, it satisfies the 4n + 2 when n = 1 (4 x 1 + 2 = 6).

It is important to mention that the 4n+2 rule is not the only criteria for determining whether a compound is aromatic or not. To be aromatic, the molecule must be cyclic, planar and have a fully conjugated system of 4n+2 electrons.
As a comparison, cyclobutadiene has two π bonds (4 delocalize electrons), and therefore it is not aromatic since 4 does not satisfy the 4n+2 formula (if n=0, we get 2 e-, if n=1, we get 6 e–). The general formula for the number of electrons here is 4n (Möbius system) and this is the class of antiaromatic compounds which are highly unstable.

So, the difference in the number of delocalized electrons brings a new class of compounds that are structurally very similar to aromatic compounds, however, their properties and stability are on the exact opposite of the spectrum. Once again, not every molecule with 4n number of delocalized electrons is considered antiaromatic. Antiaromatic compounds are also cyclic, planar and have fully conjugated 4n π electrons.
Both aromatic and antiaromatic compounds are cyclic, planar, and fully conjugated and the only difference is the number of π electrons [Huckel (4n+2) – aromatic, Mobius (4n) – antiaromatic]:

If any of these factors; cyclic, planar, fully conjugated does not match – the compound is said to be nonaromatic.

You can read more about distinguishing aromatic, nonaromatic and antiaromatic compounds in this article.
Lone Pairs in 4n+2 Systems
The 4n+2 delocalized lone pairs do not have to be π bonds. Lone pairs can also be involved in forming a fully conjugated delocalized system to make it aromatic. For example, pyrrole is an aromatic heterocyclic (a cyclic compound that contains any other atom than carbon and hydrogen) compound even though it has two π bonds.

The nitrogen here looks to be sp3 based on the steric number (S.N = 4: 3 bonds and a lone pair) but because the molecule “wants” to be aromatic”, it changes the hybridization to sp2 thus placing the lone pair in a p orbital and forming a cyclic, planar, fully conjugated system of 6 electrons:
  
 Another good example is imidazole. It is found in an important biological amine histamine the excess of which is responsible for runny nose and watery eyes symptomatic of hay fever.
Another good example is imidazole. It is found in an important biological amine histamine the excess of which is responsible for runny nose and watery eyes symptomatic of hay fever.
What’s interesting about the structure of imidazole is that it combines then two principles we discussed above for favoring of aromaticity. It has one lone pair in a perpendicular to the conjugated system sp2 orbital which is not part of the aromatic system and another one in a p orbital because the nitrogen with single bonds is sp2 hybridized favoring the aromaticity. This, in total, makes 6 electrons of the aromatic system and one lone pair which is not part of that:

Imidazole and its derivatives are also used in organic synthesis serving as a base and nucleophile to speed up reactions such as the ones of alcohols with silyl ether for preparing protecting groups.
Lone Pairs that Are Not Part of the 4n+2 System
There are cases when the presence of a lone pair might imply an antiaromatic system, however, the molecule is aromatic. For example, pyrindene is a common organic base used in many reactions.
It is an aromatic compound with 6 delocalized electrons thus satisfying the Huckel’s rule:

The question is how come the lone pair on the nitrogen is not part of the electron system changing it to 8 instead of 6 thus making pyridine antiaromatic? This is because the nitrogen is sp2-hybridized, and the lone pair of electrons is in a sp2 orbital which is perpendicular and out of the conjugated system:

Another possibility is when the heteroatom is not in the ring. For example, phenol and aniline where, in addition to the six delocalized electrons, there is a lone pair on the oxygen and nitrogen respectively:

In pyrrole we said that the nitrogen adopts an sp2 hybridization and the lone pair is in the p orbital making it delocalized over the p orbitals of the ring. So, one may wonder why the nitrogen in aniline does not adopt sp2 hybridization making the lone pair delocalized over the ring, thus making the molecule antiaromatic (8 electrons = 4n):

The fact is that both phenol and aniline are aromatic compounds which means, unlike pyrrole, we do not count the lone pairs to the six (4n+2) electrons of the aromatic system. So how do we know when to include lone pairs or other double bonds into counting the number of electrons in a possible aromatic system?
The simple answer to this is to remember that whenever possible, the molecule will adopt any geometry and hybridization to avoid being antiaromatic. The opposite is also true, whenever possible, the molecule will adopt any geometry and hybridization to be aromatic. Therefore, in pyrrole, we say that the nitrogen is sp2-hybridized and the lone pair is part of the conjugated system thus making the molecule aromatic. In phenol and aniline, we lean towards the argument that the oxygen/nitrogen does not adopt a complete sp2– hybridization and the lone pairs are not part of the 4n+2 system.
Interestingly, the acidity of the phenol is explained by the fact that the lone pairs on the oxygen are delocalized over the aromatic ring and that is why the pKa of the phenol is lower than that of other alcohols. This suggests that the oxygen must be sp2-hybridized when the phenol is deprotonated.
Likewise, we use the argument of having a delocalized lone pair in aniline to explain why it is a weaker base than cyclohexylamine. The lone pair of the nitrogen I delocalized over the aromatic system and thus not as readily available to attack a proton.

There is a separate article dedicated to the structure and basicity of amines which you can find here.
To summarize the relationship between aromaticity and hybridization or atomic orbitals, keep in mind that hybridization is a theory that we use to explain certain experimental observations and even if we say it is sp2 or sp3, it does not mean that it 100% is. Besides, the hybridization theory is not as comprehensive as the molecular orbital theory, and in general, the topic is more complex than the descriptions we use in the undergraduate chemistry courses.
A similar argument is used to explain why for example, styrene is an aromatic compound even though we can count 8 delocalized p electrons because of the neighboring double bond:

There are two factors to consider here: 1) the molecule does not have to adopt a planar geometry, 2) Even if it does, we can say that one part of the molecule is aromatic and the other is not.

This is true for more complex cyclic compounds – just because you can count 4n number of electrons and classify the molecule as antiaromatic, it does not mean it is. Keep in mind that aromatic compounds are lower in energy whereas antiaromatic compounds are higher in energy – less stable. Therefore, when possible the molecule will be aromatic, or at least a part of it would be.
As an example, consider pyrene. It has 8 pi bonds (16 electrons) which is 4n electrons indicating an antiaromatic compound is it planar and fully conjugated. However, pi bond in the middle is not part of the conjugated system as that would make the molecule antiaromatic which is energetically unfavorable:

Features of Aromatic and Antiaromatic Compounds
It is important to mention that whether a compound is aromatic or not is not determined simply based on the theoretical concepts. Aromatic compounds are characterizes with a special stability which we discussed in the introductory post of the chapter. Antiaromatic compounds, on the other hand, are generally very unstable:

An interesting tool for determining whether compound is aromatic or antiaromatic is the inscribing method of Frost circles, and you can learn more about it here.
Aromatic and antiaromatic compounds are also distinguished by NMR spectroscopy. Aromatic protons, or more accurately, protons connected to aromatic systems have characteristic high ppm values in NMR spectroscopy compared to regular alkenes. Aromatic protons appear in the 7-8 ppm region while regular alkenes give a signal in the 4-5 ppm region. Antiaromatic compounds generate a different ring current which in turn generates an induced magnetic field with opposite directions than in aromatic compounds. Thus, antiaromatic systems show the opposite trend: the inner protons appear in a higher ppm area than the outer protons. For example, the protons outside the ring of [12]annulene appear at 5.91 ppm whereas the inner protons are characterized by a chemical shift of 7.86 ppm:

You can read about larger conjugated systems in the article “Annulenes”.
Check Also:
- Naming Aromatic Compounds
- Introduction to Aromatic Compounds
- Benzene – Aromatic Structure and Stability
 Aromaticity and Huckel’s Rule
- Identify Aromatic, Antiaromatic, or Nonaromatic Compounds
- Frost Circle
- Annulenes
- Electrophilic Aromatic Substitution – The Mechanism
- The Halogenation of Benzene
- The Nitration of Benzene
- The Sulfonation of Benzene
- Friedel-Crafts Alkylation with Practice Problems
- Friedel-Crafts Acylation with Practice Problems
- Vilsmeier-Haack Reaction
- The Alkylation of Benzene by Acylation-Reduction
- Ortho Para Meta in EAS with Practice Problems
- Ortho Para and Meta in Disubstituted Benzenes
- Why Are Halogens Ortho-, Para- Directors yet Deactivators ?
- Limitations of Electrophilic Aromatic Substitution Reactions
- Orientation in Benzene Rings With More Than One Substituent
- Synthesis of Aromatic Compounds From Benzene
- Arenediazonium Salts in Electrophilic Aromatic Substitution
- Reactions at the Benzylic Position
- Benzylic Bromination
- Nucleophilic Aromatic Substitution
- Nucleophilic Aromatic Substitution Practice Problems
- Reactions of Phenols
- Reactions of Aniline
- Meta Substitution on Activated Aromatic Ring
- Electrophilic Aromatic Substitution Practice Problems
- Aromatic Compounds Quiz
 
					










