The first national survey of primary and secondary pupils' numeracy skills has found a third of S2 pupils are not performing at the expected level for maths, sparking calls for the 20-pupil maximum class size for early secondary English and maths to be reinstated.
The Scottish Survey of Literacy and Numeracy found the percentage of pupils "not yet working within the level" appropriate for their stage was less than 2 per cent at P4 and P7, rising to 32 per cent at S2.
Likewise, the percentage of pupils who performed "very well" at their level, or who got at least 75 per cent, was fairly constant between P4 and P7 at just under 30 per cent, but fell to about eight per cent at S2.
The picture was even worse for the S2 pupils from the poorest areas; pupils living in the least deprived areas were twice as likely to perform well or very well as those in areas of high disadvantage.
Scotland's largest teaching union, the EIS, called for a return to the previous class-size average of 20 pupils in English and maths across S1-2 - a demand echoed by maths education expert and University of Edinburgh lecturer Ruth Forrester.
The union's incoming general secretary, Larry Flanagan, warned, however, against setting too much store by the survey's findings for early secondary, which he argued failed to take account of pupils' development.
"One thing that happens to young people in S2 is puberty," he said. "You have to allow space for children to grow."
There was no set expectation that pupils would hit Curriculum for Excellence Level 3 by the end of S2, the measure used in the survey, continued Mr Flanagan. This was the pupil "entitlement" at the end of S3, he said.
Resources aimed at the areas which pupils found most difficult - fractions, decimal fractions and percentages and measurement - would be published on the Education Scotland website, said the Scottish government.
Ms Forrester, who is also a member of the Scottish Mathematical Council, called for the resources to be accompanied by goodquality continuing professional development for teachers.
She said: "If we are going to think about cracking a difficult nut like fractions, decimal fractions and percentages, it's not just a matter of a couple of useful worksheets but thinking deeply about the stages children need to go through."
The primary pupils' performance in maths was "hugely encouraging", said education secretary Michael Russell, who pointed out that the S2 pupils surveyed (in May 2011) were the last cohort not to benefit from Curriculum for Excellence.
"We knew that more could be done to improve literacy and numeracy and raise attainment," he said. "This is why we introduced a new curriculum which is now paying off."
The Scottish Survey of Literacy and Numeracy replaces the Scottish Survey of Achievement. The 2012 survey will focus on literacy, with the results published in 2013.
- At P4, 76 per cent of pupils performed "well" or "very well" in maths compared with 72 per cent in P7 and 42 per cent in S2.
- Pupils from the areas of least deprivation had significantly higher attainment at all stages.
- In P4 and P7, boys outperformed girls.
- The activities in which the highest percentage of pupils reported they participated "very often" were "listening to the teacher talk to the class about a topic" and "working on your own".
- Pupils at all stages gave the highest percentage of correct answers to questions where "data and analysis" was the main topic.