Chronic cocaine administration causes instability in extracellular glutamate in the nucleus accumbens that is thought to contribute to the vulnerability to relapse. A computational framework was developed to model glutamate in the extracellular space, including synaptic and nonsynaptic glutamate release, glutamate elimination by glutamate transporters and diffusion, and negative feedback on synaptic release via metabotropic glutamate receptors (mGluR2/3). This framework was used to optimize the geometry of the glial sheath surrounding excitatory synapses, and by inserting physiological values, accounted for known stable extracellular, extrasynaptic concentrations of glutamate measured by microdialysis and glutamatergic tone on mGluR2/3. By using experimental values for cocaine-induced reductions in cystine-glutamate exchange and mGluR2/3 signaling, and by predicting the down-regulation of glutamate transporters, the computational model successfully represented the experimentally observed increase in glutamate that is seen in rats during cocaine-seeking. This model provides a mathematical framework for describing how pharmacological or pathological conditions influence glutamate transmission measured by microdialysis.