Do new synapses form in the adult cortex to support experience-dependent plasticity? To address this question, we repeatedly imaged individual pyramidal neurons in the mouse barrel cortex over periods of weeks. We found that, although dendritic structure is stable, some spines appear and disappear. Spine lifetimes vary greatly: stable spines, about 50% of the population, persist for at least a month, whereas the remainder are present for a few days or less. Serial-section electron microscopy of imaged dendritic segments revealed retrospectively that spine sprouting and retraction are associated with synapse formation and elimination. Experience-dependent plasticity of cortical receptive fields was accompanied by increased synapse turnover. Our measurements suggest that sensory experience drives the formation and elimination of synapses and that these changes might underlie adaptive remodelling of neural circuits.