The modern theory of polarization establishes the bulk-boundary correspondence for the bulk polarization. In this paper, we attempt to extend it to a sum rule of the bulk quadrupole moment by employing a many-body operator introduced in [Phys. Rev. B 100, 245134 (2019)] and [Phys. Rev. B 100, 245135 (2019)]. The sum rule that we propose consists of the alternating sum of four observables, which are the phase factors of the many-body operator in different boundary conditions. We demonstrate its validity through extensive numerical computations for various non-interacting tight-binding models. We also observe that individual terms in the sum rule correspond to the bulk quadrupole moment, the edge-localized polarizations, and the corner charge in the thermodynamic limit on some models.