Individual differences in working memory relate to performance differences in general cognitive ability. The neural bases of such individual differences, however, remain poorly understood. Here, using a data-driven technique known as connectome-based predictive modeling, we built models to predict individual working memory performance from whole-brain functional connectivity patterns. Using n-back or rest data from the Human Connectome Project, connectome-based predictive models significantly predicted novel individuals' 2-back accuracy. Model predictions also correlated with measures of fluid intelligence and, with less strength, sustained attention. Separate fluid intelligence models predicted working memory score, as did sustained attention models, again with less strength. Anatomical feature analysis revealed significant overlap between working memory and fluid intelligence models, particularly in utilization of prefrontal and parietal regions, and less overlap in predictive features between working memory and sustained attention models. Furthermore, showing the generality of these models, the working memory model developed from Human Connectome Project data generalized to predict memory in an independent data set of 157 older adults (mean age = 69 years; 48 healthy, 54 amnestic mild cognitive impairment, 55 Alzheimer disease). The present results demonstrate that distributed functional connectivity patterns predict individual variation in working memory capability across the adult life span, correlating with constructs including fluid intelligence and sustained attention.