If the dead-end job, the pokey flat and the endless failings of the neighbours are getting on your wick, then spare a thought for the dog.

In research that confirms what many owners will have worked out for themselves, scientists have found that the household pets are not oblivious to their owners’ anxieties, but mirror the amount of stress they feel.

The finding comes from a study of cortisol, a stress hormone, which circulates in the blood and leaves its mark in strands of hair. Over time, as the hormone is bound into the growing hair, each shaft becomes a biological record of the stress an individual experiences.

After engaging the willing services of 25 border collies, 33 Shetland sheepdogs, and the animals’ female owners, researchers in Sweden found that higher cortisol in human hair was matched by more of the hormone in the dog hair. All of the dogs lived indoors with their owners.

“This is the first time we’ve seen a long-term synchronisation in stress levels between members of two different species,” said Lina Roth, an ethologist who led the work at Linköping University in Sweden. “We haven’t seen this between humans and dogs before.”

Roth’s team measured concentrations of cortisol in short strands of hair cut close to the skin in the winter and summer of 2017 and 2018. The link between human and dog cortisol held through the seasons, but was higher in dogs in the winter.

To investigate whether canine lifestyle had an impact on stress levels, about half of each breed enrolled was involved in regular training and competitions to test skills such as obedience and agility. The rest of the dogs were regular companion pets.

Writing in Scientific Reports, the researchers describe how stress in the competing dogs more closely mirrored that in the owners, potentially because the animals had formed a stronger bond with their owners than the companion animals.

Roth believes that there is more to the synchronisation of stress levels than simply sharing the same environment. When the scientists looked at whether dogs had a garden to play in; the hours the owner worked, and whether the dogs lived with other dogs, they found no effect on dog cortisol levels.

What did have an effect on the animals’ stress levels was their owners’ personalities, as assessed by a standard survey. The greatest factor was neuroticism.

According to the study, owners who scored higher on neuroticism tended to have dogs with lower hair cortisol levels. One explanation, said Roth, is that more neurotic owners may seek more comfort from their pets, and the onslaught of hugs and attention reduces cortisol in the dogs. “We suggest that dogs, to a great extent, mirror the stress levels of their owners,” the scientists write in the journal.

If the findings are enough to make stressed dog owners feel guilty, Roth has some words of reassurance. “Most dog owners are aware that their dogs pick up a lot of signals from them, even the unintentional ones, but it’s still beneficial to be together,” she said.

While the study claims to be the first evidence of different species synchronising their stress levels over the long term, short-term stress contagion has been seen in members of the same species before. In 2016, James Burkett at Emory University in Atlanta showed that monogamous prairie voles would react to a stressed partner by ramping up their own stress levels and grooming them more.

Burkett, who was not involved in the latest study, said the work added to a growing body of research showing that dogs empathised with their owners.

“Dogs are affected by their owners’ distress and respond with consoling behaviours,” he said. “We now know that dogs are also affected by their owners’ personalities and stress levels. While this may be common sense for dog owners, empirical research is still catching up to our intuitions about animal empathy.”