In light of the dual public health crises of chronic pain and opioids, there is an urgent need to develop non-addictive alternative therapies for chronic pain. Transcranial magnetic stimulation (TMS) is a non-invasive method of neuromodulation that evokes electrical currents in the brain via the application of single or repeated magnetic pulses to the cranial surface. While there is increasing clinical evidence TMS can have an analgesic effect for treating chronic pain, exactly how TMS influences neural spiking patterns in different brain areas and whether TMS has a net excitatory or inhibitory effect on brain circuit dynamics remain unknown. For this reason, there is currently no principled or quantitative method to optimize TMS parameters—such as the number, timing, amplitude, frequency, anatomical placement and orientation of the magnetic pulses—so as to enhance the therapeutic efficacy and duration of chronic pain relief. Thus, present approaches with TMS are essentially trial-and-error. To optimize and create new TMS therapies, our collaboration seeks to uncover the biological mechanisms by which TMS modulates chronic pain-related neuronal activity. Our clinical goal is to identify a novel TMS protocol (CPStim) that has been optimized for chronic pain treatment. Based on the TMS parameters presently used clinically for treating chronic pain, we will first use a mouse model of chronic pain to perform a mechanistic analysis of how the different TMS parameters impact neurons in the brain’s pain circuits that are known from our past work to have important roles in pain perception. To do this, we will employ the Schnitzer lab’s state of-the-art optical brain-imaging techniques, which unlike electrical recording methods are immune to the electrical measurement artefacts caused by TMS stimulation. Once we identify the geometric and temporal TMS parameters that most effectively modulate pain-circuit activity and mouse behaviors indicative of chronic pain, we will transfer these parameters to ongoing clinical trials at Stanford in the Mackey lab using TMS in chronic pain patients. This will allow us to evaluate the efficacy of our identified CPStim protocol against current clinical TMS protocols for chronic pain, with the aim of attaining FDA approval, integration into current commercially available TMS devices, and adoption into clinical practice and health care insurance plans.