Inter-individual variance in longevity (or any other demographic outcome) may arise from heterogeneity or from individual stochasticity. Heterogeneity refers to differences among individuals in the demographic rates experienced at a given age or stage. Stochasticity refers to variation due to the random outcome of demographic rates applied to individuals with the same properties. The variance due to individual stochasticity can be calculated from a Markov chain description of the life cycle. The variance due to heterogeneity can be calculated from a multistate model that incorporates the heterogeneity. We show how to use this approach to decompose the variance in longevity into contributions from stochasticity and heterogeneous frailty for male and female cohorts from Sweden (1751-1899), France (1816-1903), and Italy (1872-1899), and also for a selection of period data for the same countries. Heterogeneity in mortality is described by the gamma-Gompertz-Makeham model, in which a gamma distributed "frailty" modifies a baseline Gompertz-Makeham mortality schedule. Model parameters were estimated by maximum likelihood for a range of starting ages. The estimates were used to construct an age×frailty-classified matrix model, from which we compute the variance of longevity and its components due to heterogeneous frailty and to individual stochasticity. The estimated fraction of the variance in longevity due to heterogeneous frailty (averaged over time) is less than 10% for all countries and for both sexes. These results suggest that most of the variance in human longevity arises from stochasticity, rather than from heterogeneous frailty.