The octet rule is a chemical rule of thumb that reflects the theory that main-group elements tend to bond in such a way that each atom has eight electrons in its valence shell, giving it the same electron configuration as a noble gas. The octet rule is based on the observation that the atoms of the main group elements have a tendency to participate in chemical bonding in such a way that each atom of the resulting molecule has eight electrons in the valence shell. The octet rule is only applicable to the main group elements, and when atoms have fewer than eight electrons, they tend to react and form more stable compounds/Electronic_Structure_of_Atoms_and_Molecules/Electronic_Configurations/The_Octet_Rule). The octet rule is useful for the main group elements (elements not in the transition metal or inner-transition metal blocks); an octet in these atoms corresponds to an electron configuration ending with s2p6/Electronic_Structure_of_Atoms_and_Molecules/Electronic_Configurations/The_Octet_Rule).
Exceptions to the octet rule include free radicals, which are ions, atoms, or molecules containing an unpaired valence electron. These species disobey the octet rule, but they are very unstable and tend to spontaneously dimerize. Another exception is the transition metals, which do not normally follow the octet rule due to the presence of d-block electrons. Electron-deficient molecules such as boranes also do not obey the octet rule but share delocalized electrons in a manner similar to metallic bonding. Although stable odd-electron molecules and hypervalent molecules are commonly taught as violating the octet rule, ab initio molecular orbital calculations show that they largely obey the octet rule.
In summary, the octet rule is a chemical rule of thumb that reflects the theory that main-group elements tend to bond in such a way that each atom has eight electrons in its valence shell. Exceptions to the octet rule include free radicals, transition metals, and electron-deficient molecules such as boranes.