Dendritic spines receive most excitatory inputs in the vertebrate brain, but their function is still poorly understood. Using two-photon calcium imaging of CA1 pyramidal neurons in rat hippocampal slices, we investigated the mechanisms by which calcium enters into individual spines in the stratum radiatum. We find three different pathways for calcium influx: high-threshold voltage-sensitive calcium channels, NMDA receptors, and an APV-resistant influx consistent with calcium-permeable AMPA or kainate receptors. These pathways vary among different populations of spines and are engaged under different stimulation conditions, with peak calcium concentrations reaching >10 microM. Furthermore, as a result of the biophysical properties of the NMDA receptor, the calcium dynamics of spines are exquisitely sensitive to the temporal coincidence of the input and output of the neuron. Our results confirm that individual spines are chemical compartments that can perform coincidence detection. Finally, we demonstrate that functional studies and optical quantal analysis of single, identified synapses is feasible in mammalian CNS neurons in brain slices.