Current theories suggest that visual and spatial processes in working memory are crucial for learning from animation. However, despite over three decades of research on learning from animation, little is known about how visuospatial working memory relates to learning. Instead, animation research often relies on subjective task load to explain and predict learning performance. To better understand how visuospatial working memory and learning from animation are related, a within-subjects study was conducted. Eighty six students learned from two animations of different complexity. The students' performance on visual learning tasks, visual and spatial working memory capacity, and perceived task load were assessed. Hierarchical regression analyses show that visuospatial working memory capacity is more critical for learning from a complex animation than for learning from a less complex animation. Moreover, visuospatial working memory capacity predicts learning from a complex animation significantly better than subjective task load. The effect size is large. The results provide a coherent picture of the relationships between learning task demands, learners' visuospatial working memory, perceived task load and learning performance. They not only allow for a more accurate prediction of learning from animation but can also help to tailor the design and use of animations to the learners' cognitive resources.