Relax, folks - the nappy changes, tantrums, talking back, and anxious evenings are all worth it in the end.

Researchers have crunched the numbers on the life expectancy of both parents and non-parents, and found having at least one child can stave off death for at least a year or so in your old age - an effect that becomes more pronounced the older you get.

We've known for some time that having kids seems to make you live longer, especially if you have them early in life.

What nobody knows is why this happens, so a team of researchers from Karolinska Institute in Sweden broke down the statistics of elderly parents and analysed how having a child affects a person's chances of seeing another birthday.

Using data from several Swedish national registries, the team looked at more than 700,000 men and 725,000 women born between 1911 and 1925 who also happened to be living in Sweden at the age of 60, and identified which had children, which were educated, which were married, and when they died.

Unsurprisingly, as each individual got older, their risk of dying went up.

But they found that having children reduced this risk by a small fraction - childless men aged 60 could expect to live another 18.4 years, while having at least one kid bumped it up to another 20.2 years.

For women, being a mother at age 60 added about a year and a half to their life, increasing it from 23.1 to 24.6 more years of existence.

Those dads who made it to 80 could look forward to another 7.7 years on average, while men without a child only had another 7.

Eighty-year-old mums, on the other hand, could gamble on 9.5 more years - about 7 months more than childless women, who averaged another 8.9 years.

The statistics didn't show any specific advantage of having one gender over another, although other studies have indicated that in other cultures. this might not necessarily be the case, with daughters in Taiwan presenting a slight advantage over sons.

One thing the researchers noticed was that as the years went by, it seemed that men were getting the better deal.

"The finding of a stronger association for men than for women is in line with a previous study where contact with children was associated with better health among parents, and more so for men than for women," the researchers wrote in their study.

When combined with their finding that this effect was greater among unmarried men, it seems that having kids offers health-promoting support in old age.

Throwing education into the mix also hints at an interesting hypothesis.

"Another possible explanation to the greater mortality difference among men may be that childless men are generally lower educated than men with children, whereas the opposite is true for women," wrote the researchers.

The study does not provide a definitive reason for why parents seem to live a little longer than non-parents, but it does paint a picture of children offering healthcare support, advice, and stimulation as their folks go into their twilight years.

But one discovery made by the researchers contradicts this assumption - it makes no difference if your child happens to live close by. In fact, the results appear to go the other way - having children live far away adds a little extra to your life.

That said, the researchers admit their inclusion of geographical data was rather crude, and referred to previous research that suggests educated children tended to move further away from home, but also correlated with longer lives for their parents.

Education and a helping hand in old age won't necessarily see you avoid an early grave, but every little bit can help stack the odds in your favour as time ticks by.

Not that you should rush out and procreate just to buy yourself another 12 months or so on this mortal coil.

"In terms of all other causes that would affect your death risk in these old ages, having a child is not among the greatest ones," researcher Karin Modig told Nicola Davis from The Guardian.

"But it is still a 1.5 percent difference [for 90-year-old men] which is still substantial."

This research was published in the Journal of Epidemiology & Public Health.