A team of scientists, led by Dr Paul Veugelers of the University of Alberta, carried out a survey on some 5,000 schoolchildren and their parents.
The researchers took down details of the youngsters' dietary habits, including their consumption of healthy foods such as fruits, vegetables, grains, dietary fibre, protein and calcium, and how much unhealthy unsaturated fat and salt they ate.
The children were then asked to carry out a literary assessment to give an idea of their academic ability.
Analysis revealed that children with a healthier diet were 41 per cent less likely to fail the literary assessment than those with a poor diet.
The findings are published in the Journal of School Health and the researchers concluded: "We demonstrated that above and beyond socioeconomic factors, diet quality is important to academic performance."