UK researchers found that 56 per cent of women on a high-calorie diet gave birth to a boy, compared with 45 per cent of women on a low-calorie diet.
Furthermore, a strong correlation was seen between women eating breakfast cereals and producing sons.
The finding is the first clear evidence that a mother's eating habits can influence the gender of her baby.
Researchers say the discovery of a link between calories and gender may explain why there has been a small, steady decline in the proportion of boys born in developed countries over the past 40 years.
What is the research?
The reports are based on the findings of a UK study of 740 healthy first-time pregnant women, none of whom knew the gender of their baby until birth.
They completed food frequency questionnaires at 16 and 28 weeks' gestation. Details of diet in the year prior to conception were also collected.
The women were then divided into three groups according to daily calorie intake at the time of conception.
In the group with the highest calorie intake, 56 per cent of women gave birth to a boy, compared with 49 per cent in the middle calorie group and 45 per cent in the lowest calorie intake group.
The average daily calorie intake for women who had sons was 2,413, but those who had daughters had eaten around 2,283 calories a day.
Women who had sons also consumed more nutrients, including iron, potassium, calcium and vitamins C, E and B12.
Focusing on specific foods, the researchers found the consumption of breakfast cereal before pregnancy was strongly associated with infant gender.
Women who ate at least one bowl of breakfast cereal a day were 1.87 times more likely to have a boy than women who ate less than one bowl a day.
No other foods were significantly linked to infant gender.
What do the researchers say?
Lead researcher Dr Fiona Mathews, from the school of biosciences at the University of Exeter, said: 'We found a linear relationship between calorie intake and the probability of having a boy.
'We also found that levels of nutrients such as iron and potassium were higher in the women that had boys.'
The cereal link is probably indicative of calorie intake in a morning, rather than food type, she said. The data was collected in such a way that the researchers were unable to distinguish when in a day food was eaten.
But given that cereal is a popular breakfast choice in the UK, this link was assumed.
However, calorie intake is the most likely explanation because this fits in with evolutionary theories, added Dr Mathews.
If a mother has plentiful resources then it can make sense to invest in producing a son because he is likely to produce more grandchildren than would a daughter, she said.
'Randomised controlled trials are needed to identify why having a high-calorie diet around the time of conception can increase the chances of having a boy,' added Dr Mathews.
What do other researchers say?
Dr Laurence Shaw, deputy medical director at the Bridge Fertility Clinic in London and a spokesman for the British Fertility Foundation, said: 'GPs should advise women not to starve themselves to have a girl or binge on high-calorie foods to have a boy, as this will have a negative impact on fertility.
'Women should be advised to maintain an optimal BMI of 20-30 during pregnancy.'
- Women who consume a high-calorie diet around conception have an increased chance of having a son.
- Eating breakfast may almost double the chance of a woman giving birth to a boy.
- Further research is required to identify how a high-calorie diet at conception can influence baby gender.