The influx of calcium ions into the dendritic spines through the N-methyl-D-aspartate (NMDA) channels is believed to be the primary trigger for various forms of synaptic plasticity. In this paper, the authors calculate analytically the mean values of the calcium transients elicited by a spiking neuron undergoing a simple model of ionic currents and back-propagating action potentials. The relative variability of these transients, due to the stochastic nature of synaptic transmission, is further considered using a simple Markov model of NMDA receptors. One finds that both the mean value and the variability depend on the timing between presynaptic and postsynaptic action potentials. These results could have implications for the expected form of the synaptic-plasticity curve and can form a basis for a unified theory of spike-time-dependent, and rate-based plasticity.