Attention is central to many aspects of cognition, but there is no singular neural measure of a person's overall attentional functioning across tasks. Here, using original data from 92 participants performing three different attention-demanding tasks during functional magnetic resonance imaging, we constructed a suite of whole-brain models that can predict a profile of multiple attentional components (sustained attention, divided attention and tracking, and working memory capacity) for novel individuals. Multiple brain regions across the salience, subcortical and frontoparietal networks drove accurate predictions, supporting a common (general) attention factor across tasks, distinguished from task-specific ones. Furthermore, connectome-to-connectome transformation modelling generated an individual's task-related connectomes from rest functional magnetic resonance imaging, substantially improving predictive power. Finally, combining the connectome transformation and general attention factor, we built a standardized measure that shows superior generalization across four independent datasets (total N = 495) of various attentional measures, suggesting broad utility for research and clinical applications.