Abstract Working memory is a limited capacity system that stores and processes information over short time periods and is essential for learning new information. Some studies have investigated the associations between socioeconomic position and working memory, however none have examined this across potentially dissociable aspects of working memory. Further, there are very few studies about children’s working memory differences across and within different ethnic groups. Therefore, there is a need to understand the potential associations between socioeconomic position, ethnicity, and different aspects of children’s working memory. We investigated children’s working memory ( n = 15,154) by socioeconomic group, using a latent class measure of family socioeconomic position, and then by ethnic group. To account for potential problems in applying socioeconomic measures across different ethnic groups, we then examined associations using an ethnic-specific socioeconomic measure within the ethnic majority group (White British) and the largest ethnic minority group (Pakistani). We found a strong association between socioeconomic group at birth and working memory at age 7–10 years, where the difference between the least and most deprived socioeconomic groups was equivalent to at least a 1-year age difference. We also found substantial differences in working memory between nine ethnic groups that varied by working memory task, where the difference between groups was equivalent to an age difference of between 6 and 24 months. Finally, we found evidence for a socioeconomic gradient in working memory for White British children, but this was considerably reduced in Pakistani children. These findings show the importance of separating out different ethnic groups when investigating associations between socioeconomic position and cognitive function, and that researchers need to be mindful when applying socioeconomic measures across ethnic groups. Where possible, ethnic-specific measures of socioeconomic position should be developed and applied for studies like these. Future research considering the possible mechanisms behind associations between ethnicity and working memory, and mechanisms by which socioeconomic position differentially influences working memory performance for different ethnic groups would shed further light on this important topic.