Frontal midline theta rhythm (Fmθ) appears widely distributed over medial prefrontal areas in EEG recordings, indicating focused attention. Although mental calculation is often used as an attention-demanding task, little has been reported on calculation-related activation in Fmθ experiments. In this study we used spatially filtered MEG and permutation analysis to precisely localize cortical generators of the magnetic counterpart of Fmθ, as well as other sources of oscillatory activity associated with mental calculation processing (i.e., arithmetic subtraction). Our results confirmed and extended earlier EEG/MEG studies indicating that Fmθ during mental calculation is generated in the dorsal anterior cingulate and adjacent medial prefrontal cortex. Mental subtraction was also associated with gamma event-related synchronization, as an index of activation, in right parietal regions subserving basic numerical processing and number-based spatial attention. Gamma event-related desynchronization appeared in the right lateral prefrontal cortex, likely representing a mechanism to interrupt neural activity that can interfere with the ongoing cognitive task.