This study proposes a computational method to directly obtain the frequency-dependent permeability and permittivity of materials from computer simulation data. The method combines first-principles calculations, Green’s function formalism, and magnetic moment dynamics simulations. Using α-Fe2O3 as an example, we demonstrate the validation process of the computational approach. By calculating the time correlation functions of electric and magnetic dipole moments and applying linear response theory, we successfully obtained the frequency-dependent permeability and permittivity of α-Fe2O3 at 300 K. The calculated results agree well with experimental values, proving the efficacy of the proposed computational method. This study provides a reliable computational pathway to predict electromagnetic parameters of materials using computer simulations.