The conjugacy classes for \(S_4\) are
\begin{gather*}
{\mathcal O}_{(1)} = \{ (1) \},\\
{\mathcal O}_{(12)} = \{ (1 \, 2), (1 \, 3), (1 \, 4), (2 \, 3), (2 \, 4), (3 \, 4) \},\\
{\mathcal O}_{(1 \, 2)(3 \, 4)} = \{ (1 \, 2)(3 \, 4), (1 \, 3)(2 \, 4), (1 \, 4)(2 \, 3) \},\\
{\mathcal O}_{(123)} = \{ (1 \, 2 \, 3), (1 \, 3 \, 2), (1 \, 2 \, 4), (1 \, 4 \, 2), (1 \, 3 \, 4), (1 \, 4 \, 3), (2 \, 3 \, 4), (2 \, 4 \, 3) \},\\
{\mathcal O}_{(1234)} = \{ (1 \, 2 \, 3 \, 4), (1 \, 2 \, 4 \, 3), (1 \, 3 \, 2 \, 4), (1 \, 3 \, 4 \, 2), (1 \, 4 \, 2 \, 3), (1 \, 4 \, 3 \, 2) \}\text{.}
\end{gather*}
The class equation is \(1 + 3 + 6 + 6 + 8 = 24\text{.}\)