No one knows how it started, or where it came from, but the idea that you can convert your dog's age to human years by multiplying by seven? Total myth. But we like to contextualise our animal companions' ageing against our own lives; if nothing else, it helps us to relate to them.

Finding an accurate way to do so isn't easy, but a team of researchers has developed a formula. And it's based not on some arbitrary metric, but on changes to DNA over time; they've described it in a paper published on the pre-print resource bioRxiv ahead of peer review.

The team's method is based on an epigenetic mechanism called methylation. As both humans and domestic dogs (Canis lupus familiaris) age, methyl groups are added to our DNA molecules, which can change the activity of a DNA segment without altering the DNA itself.

This obviously has its own function, but one corollary is that DNA methylation can be used to measure age in humans. This is called the epigenetic clock.

So, led by geneticists Tina Wang and Trey Ideker of the University of California San Diego, the researchers set out to compare the epigenetic clock of humans to the epigenetic clock of dogs.

Dog lifespans can vary wildly: from 6-7 years for some large breeds such as mastiffs to as many as 17-18 years for dogs such as chihuahuas. Despite this variation, all dogs exhibit a similar developmental, physiological, and pathological trajectory.

A single breed offers strong genome homogeneity, which increases the chance of identifying genetic factors associated with complex traits including ageing, the team said. So they used Labrador retriever dogs for this study.

They then compared their dog data to the published methylation profiles from the blood of 320 humans, aged between one and 103 years, and those of 133 mice.

"Using targeted sequencing, we characterise the methylomes of 104 Labrador retrievers spanning a 16 year age range, achieving >150X coverage within mammalian syntenic blocks," they wrote in their paper.

"Comparison with human methylomes reveals a nonlinear relationship which translates dog to human years, aligns the timing of major physiological milestones between the two species, and extends to mice."

The similarities were the greatest when comparing young dogs to young humans, and elderly dogs to elderly humans.

This matching of the epigenetic clocks allowed the team to derive a formula for calculating the 'human' age of dogs: human_age = 16ln(dog_age) + 31.

So, multiply the natural logarithm of your dog's age in years (here's a calculator you can use) by 16, then add 31. That will give you the dog's age in 'human years'.

Using this formula, certain milestones matched up really well. Seven weeks in dogs was found to correspond with nine months in humans - the time when baby teeth are erupting in puppies and infants. The two species' average lifespans also matched up - 12 years for the Labradors, and 70 for humans.

That said, other milestones didn't match up quite so well. Dogs, for instance, go through puberty and reach sexual maturity faster than humans, so the period between adolescence and middle age doesn't match up - a five-year-old Labrador is calculated at around 56 in human years. But dog methylation slows down as they age, so humans can catch up.

And, of course, there's that pesky problem with different breeds ageing differently. So we'll probably never have a one-size-fits-all approach - but a formula based on the epigenetic clock is considerably more useful than simply multiplying by seven.

The team's research has been published on bioRxiv.