The neuromodulators oxytocin and serotonin have been implicated in regulating affective processes underlying empathy. Understanding this dependency, however, has been limited by a lack of objective metrics for measuring empathic performance. Here we employ a novel psychophysical method for measuring empathic performance that quantitatively measures the ability of subjects to decode the experience of another person's pain. In 50 female subjects, we acquired functional magnetic resonance imaging data as they were exposed to a target subject experiencing variable degrees of pain, whilst performing an irrelevant attention-demanding task. We investigated the effect of variation in the oxytocin receptor gene (OXTR) and the serotonin transporter gene (SLC6A4) on the psychophysical and neurometric variability associated with empathic performance. The OXTR rs2268498 and rs53576 polymorphisms, but not the SLC6A4 5-HTTLPR, were associated with significant differences in empathic accuracy, with CC- and AA-carriers, respectively, displaying higher empathic accuracy. For OXTR rs2268498 there was also a genotype difference in the correlation between empathic accuracy and activity in the superior temporal sulcus (STS). In OXTR rs2268498 CC-carriers, high empathic accuracy was associated with stronger responsiveness of the right STS to the observed pain. Together, the results show that genetic variation in the OXTR has significant influence on empathic accuracy and that this may be linked to variable responsivity of the STS.