Mathematics is a central part of the school curriculum. Alongside studies in the dominant language of a society, success and failure in the discipline play an important role in the distribution of opportunities to children and young people. Until fairly recently, in England and elsewhere, success in primary school mathematics was achieved by demonstrating a capacity to memorise, reproduce and use relatively simple algorithms. However, in recent years, there has been considerable change in primary school mathematics with an increasing stress being laid, at least rhetorically, on understanding, investigation and the application of mathematics in 'realistic' settings. It seems likely that such changes, in so far as they affect the form and content of National Curriculum assessment, will produce changes in who succeeds and who fails, ie in selective processes within schooling.The paper draws on preliminary results from an ESRC project which is examining National Curriculum assessment in mathematics for 10-11 and 13-14 year-old children in relation to class, gender and 'ability'. The paper examines the ways in which children from different sociocultural backgrounds approach assessment items which embed mathematics in supposedly 'realistic' contexts. Early data from the Key Stage 2 sample of 10-11 year olds will be presented which shows that there does seem be a social class effect in the response of children to 'realistic' items -one which leads to some working class children failing to demonstrate competences they have. The paper uses quantitative and qualitative methods, relating its findings to Basil Bernstein's account of sociocultural codesin particular his theorising of the social distribution of recognition and realisation rules for reading educational contexts -and to Bourdieu's theorising of habitus.