The presence of topological defects in magnetic media often leads to normal modes with zero frequency (zero modes). Such modes are crucial for long-time behavior, describing, for example, the motion of a domain wall as a whole. Conventional numerical methods to calculate the spin-wave spectrum in magnetic media are either inefficient or they fail for systems with zero modes. We present a new efficient computational scheme that reduces the magnetic normal-mode problem to a generalized Hermitian eigenvalue problem also in the presence of zero modes. We apply our scheme to several examples, including two-dimensional domain walls and Skyrmions, and show how the effective masses that determine the dynamics can be calculated directly. These systems highlight the fundamental distinction between the two types of zero modes that can occur in spin systems, which we call special and inertial zero modes. Whereas the inertial modes are generic Goldstone modes related to a broken continuous symmetry, the special modes arise naturally when two broken continuous symmetries coexist. Our method is suitable for both conservative and dissipative systems. For the latter case, we present a perturbative scheme to take into account damping, which can also be used to calculate dynamical susceptibilities.