(CNN) Having children will make you happier than staying childless, according to a new study, but not until later in life, when they have flown the nest.
A team of researchers at Heidelberg University in Germany found that parents tend to be happier than non-parents in old age, but this only holds if their kids have moved out.
Previous research has suggested that parenthood, social networks and marital status affect the well-being and mental health of older people, and this latest study looks at the effects of family status.
Scientists asked 55,000 people age 50 and over from 16 European countries about their mental well-being, and results suggest "the positive aspects of parenthood dominate when getting older."
One of the biggest factors is that children become a form of social support, and the researchers point out that social support networks are associated with greater happiness and less loneliness and can act as a buffer against stressful events.
"The results suggest that the finding of a negative link between children and well-being and mental health may not generalize to older people whose children have often left home already," the study says.
"As stress associated with balancing the competing demands of childcare, work and personal life decreases, once people get older and their children leave (home), the importance of children as caregivers and social contacts might prevail."
However, children who still live at home are shown to have a negative effect on well-being.
Christoph Becker, who formed part of the research team, told CNN that having a social network corresponds to greater life satisfaction, but that doesn't have to come from children.
Older people without children could get similar benefits from other close social connections with whom they can share issues and problems, he added.
Becker told CNN there are plans to track happiness for the same people over multiple years to study how well being evolves as people get older.
"Literature has suggested that there might be U-shaped connection between age and happiness: people become less happy in middle age, but more happy in older age," said Becker.
"We want to test if we find a similar relationship in our data, depending again on parenthood and social networks."
Previous research on the subject has been mixed.
A report by Princeton University and Stony Brook University published in the Proceedings of the National Academy of Sciences found "very little difference" between the life satisfaction of parents and people without children, once other factors -- such as income, education, religion and health -- were factored out, said Arthur Stone, one of the study's co-authors.
Another study, by the Open University in England, found childless couples were happier with their relationships and their partners than parents were, and were doing more work on their relationships than parenting couples.