Dendritic spines receive most excitatory inputs in the CNS and compartmentalize calcium. Although the mechanisms of calcium influx into spines have been explored, it is unknown what determines the calcium decay kinetics in spines. With two-photon microscopy we investigate action potential-induced calcium dynamics in spines from rat CA1 pyramidal neurons in slices. The [Ca(2+)](i) in most spines shows two decay kinetics: an initial fast component, during which [Ca(2+)](i) in spines decays to dendritic levels, followed by a slower decay phase in which the spine follows dendritic kinetics. The correlation between [Ca(2+)](i) in spine and dendrite at the breakpoint of the decay kinetics demonstrates diffusional equilibration between spine and dendrite during the slower component. To explain the faster initial decay, we rule out saturation or kinetic effects of endogenous or exogenous buffers and focus instead on (1) active calcium extrusion and (2) buffered diffusion of calcium from spine to dendrite. The presence of an undershoot in most spines indicates that extrusion mechanisms can be intrinsic to the spine. Supporting the two mechanisms, pharmacological blockade of smooth endoplasmic reticulum calcium (SERCA) pumps and the length of the spine neck affect spine decay kinetics. Using a mathematical model, we find that the contribution of calcium pumps and diffusion varies from spine to spine. We conclude that dendritic spines have calcium pumps and that their density and kinetics, together with the morphology of the spine neck, determine the time during which the spine compartmentalizes calcium.