The chances of having a bright child have turned around since the 1970s, when children of young mothers were smarter.
The switch has come about over the past four decades as millions of women have put off early marriage and raising a family in favour of their own education and career.
As a result, older mothers now are likely to be better educated and wealthier than those who have babies at younger ages, and their children do better in intelligence tests. Their health is also better than it would have been for their age group in the 1970s.
Researchers from the London School of Economics and the Max Planck Institute for Demographic Research said children born to women in their late thirties were likely to be a mother's first child - and parents tend to lavish more attention on their first-born.
The findings covered 50000 children in three national surveys of those born in 1958, 1970 and in 2001.
Their cognitive ability - the power to think, read, learn, remember and pay attention - was recorded at 10 and 11. Children born to mothers aged 25 to 29 in 1958 and 1970 did better in the tests than those of mothers aged 35 to 39. But for children born in 2001, the results were reversed. The average age of a new mother was 27 in the late 1960s. It's now 30.3, and women over 40 are more likely than teenage girls to have a baby.
Author Dr Alice Goisis said: "Cognitive ability is a strong predictor of how children fare in later life in terms of educational attainment, occupation and health."