The conjugacy classes for \(S_4\) are
\begin{gather*}
{\mathcal O}_{(1)} = \{ (1) \},\\
{\mathcal O}_{(12)} = \{ (12), (13), (14), (23), (24), (34) \},\\
{\mathcal O}_{(12)(34)} = \{ (12)(34), (13)(24), (14)(23) \},\\
{\mathcal O}_{(123)} = \{ (123), (132), (124), (142), (134), (143), (234), (243) \},\\
{\mathcal O}_{(1234)} = \{ (1234), (1243), (1324), (1342), (1423), (1432) \}.
\end{gather*}
The class equation is \(1 + 3 + 6 + 6 + 8 = 24\text{.}\)