Total electron-scattering cross sections of pyrimidine, the basic component for the nucleic bases cytosine and thymine, were measured for electron energies from 5 eV to 1 keV using the linear transmission method. The measured results were compared to semiempirical data obtained by means of the additivity rule and to experimental data for benzene since it has a similar ring structure and the same number of valence electrons as pyrimidine. Furthermore, integral elastic and inelastic electron-scattering cross sections of pyrimidine were calculated by applying the spherical complex optical potential model. The sum of both cross sections agrees reasonably well with the experimental total electron-scattering cross sections of pyrimidine in the energy range from 20 eV to 1 keV. The experimental data are, however, significantly lower than the theoretical cross sections when including the contribution of rotational excitations to the electron scattering.