Electrical brain stimulation is a promising tool for both experimental and clinical applications. However, the effects of stimulation on neuronal activity are highly variable and poorly understood. To investigate the basis of this variability, we performed extracellular recordings in the visual cortex following application of transcranial magnetic stimulation (TMS). Our measurements of spiking and local field potential activity exhibit two types of response patterns which are characterized by the presence or absence of spontaneous discharge following stimulation. This variability can be partially explained by state-dependent effects, in which higher pre-TMS activity predicts larger post-TMS responses. These results reveal the possibility that variability in the neural response to TMS can be exploited to optimize the effects of stimulation. It is conceivable that this feature could be utilized in real time during the treatment of clinical disorders.