Cortical long-term plasticity depends on firing rate, spike timing, and cooperativity among inputs, but how these factors interact during realistic patterns of activity is unknown. Here we monitored plasticity while systematically varying the rate, spike timing, and number of coincident afferents. These experiments demonstrate a novel form of cooperativity operating even when postsynaptic firing is evoked by current injection, and reveal a complex dependence of LTP and LTD on rate and timing. Based on these data, we constructed and tested three quantitative models of cortical plasticity. One of these models, in which spike-timing relationships causing LTP "win" out over those favoring LTD, closely fits the data and accurately predicts the build-up of plasticity during random firing. This provides a quantitative framework for predicting the impact of in vivo firing patterns on synaptic strength.