The Heisenberg uncertainty principle argues that all atoms in a molecule are constantly in motion (otherwise we would know position and momentum accurately). For molecules, they exhibit three general types of motions: translations (external), rotations (internal) and vibrations (internal). A diatomic molecule contains only a single motion., while polyatomic molecules exhibit more complex vibrations, known as normal modes.
Calculate Number of Vibrational Modes
Degree of freedom is the number of variables required to describe the motion of a particle completely. For an atom moving in 3dimensional space, three coordinates are adequate so its degree of freedom is three. Its motion is purely translational. If we have a molecule made of N atoms (or ions), the degree of freedom becomes 3N, because each atom has 3 degrees of freedom. Furthermore, since these atoms are bonded together, all motions are not translational; some become rotational, some others vibration. For nonlinear molecules, all rotational motions can be described in terms of rotations around 3 axes, the rotational degree of freedom is 3 and the remaining 3N6 degrees of freedom constitute vibrational motion. For a linear molecule however, rotation around its own axis is no rotation because it leave the molecule unchanged. So there are only 2 rotational degrees of freedom for any linear molecule leaving 3N5 degrees of freedom for vibration.
The degrees of vibrational modes for linear molecules can be calculated using the formula:
\[3N5 \label{1}\]
The degrees of freedom for nonlinear molecules can be calculated using the formula:
\[3N6 \label{2}\]
\(n\) is equal to the number of atoms within the molecule of interest. The following procedure should be followed when trying to calculate the number of vibrational modes:
 Determine if the molecule is linear or nonlinear (i.e. Draw out molecule using VSEPR). If linear, use Equation \ref{1}. If nonlinear, use Equation \ref{2}
 Calculate how many atoms are in your molecule. This is your \(N\) value.
 Plug in your \(N\) value and solve.
Example \(\PageIndex{1}\): Carbon dioxide
How many vibrational modes are there in the linear \(\ce{CO_2}\) molecule ?
 Answer

There are a total of \(3\) atoms in this molecule. It is a linear molecule so we use Equation \ref{1}. There are \[3(3)5 = 4 \nonumber\] vibrational modes in \(\ce{CO_2}\).
Would \(\ce{CO_2}\) and \(\ce{SO_2}\) have a different number for degrees of vibrational freedom? Following the procedure above, it is clear that \(\ce{CO_2}\) is a linear molecule while \(\ce{SO_2}\) is nonlinear. \(\ce{SO_2}\) contains a lone pair which causes the molecule to be bent in shape, whereas, \(\ce{CO_2}\) has no lone pairs. It is key to have an understanding of how the molecule is shaped. Therefore, \(\ce{CO_2}\) has 4 vibrational modes and \(\ce{SO_2}\) has 3 modes of freedom.
 Followup (\(\ce{SO_2}\))

Would \(\ce{CO_2}\) and \(\ce{SO_2}\) have a different number for degrees of vibrational freedom? Following the procedure above, it is clear that \(\ce{CO_2}\) is a linear molecule while \(\ce{SO_2}\) is nonlinear. \(\ce{SO_2}\) contains a lone pair which causes the molecule to be bent in shape, whereas, \(\ce{CO_2}\) has no lone pairs. It is key to have an understanding of how the molecule is shaped. Therefore, \(\ce{CO_2}\) has 4 vibrational modes and \(\ce{SO_2}\) has 3 modes of freedom.
Example \(\PageIndex{2}\): Methane
How many vibrational modes are there in the tetrahedral \(\ce{CH_4}\) molecule ?
 Answer

In this molecule, there are a total of 5 atoms. It is a nonlinear molecule so we use Equation \ref{2}. There are \[3(5)6 = 9\nonumber\] vibrational modes in \(\ce{CH_4}\).
Example \(\PageIndex{3}\): Buckyballs
How many vibrational modes are there in the nonlinear \(\ce{C_{60}}\) molecule ?
 Answer

In this molecule, there are a total of 60 carbon atoms. It is a nonlinear molecule so we use Equation \ref{2}. There are \[3(60)6 = 174\nonumber\] vibrational modes in \(\ce{C_60}\).
References
 Harris, Daniel C., and Michael D. Bertolucci. Symmetry and Spectroscopy: an Introduction to Vibrational and Electronic Spectroscopy. New York: Dover Publications, 1989. Print.
 Housecroft, Catherine E., and Alan G. Sharpe. Inorganic Chemistry. Harlow: Pearson Education, 2008. Print.