Although the magnetic Gilbert damping was considered as a scalar quantity in micromagnetic and atomistic spin simulations, recent investigations show that the Gilbert damping is a tensor. Here, we investigate the effect of anisotropic and chiral damping in one-sublattice ferromagnets and two-sublattice antiferromagnets. We employ linear response theory to calculate the susceptibility with the damping tensor and determine the ferromagnetic and antiferromagnetic resonance frequencies and effective damping. Our results show that apart from the scalar Gilbert damping, the antisymmetric chiral damping has a significant contribution to the spin dynamics. To this end, we also compare the tensorial damping and cross-sublattice scalar damping in antiferromagnets.