Millennials recently surpassed boomers as the nation’s largest pet-owning generation, according to data from research firm GfK, and there’s evidence that letting young workers bring their furry friends to the office can result in happier, healthier employees who may even put in longer hours. With millennials estimated to make up nearly half the U.S. workforce by 2020, allowing pets in the workplace is a benefit that could attract employees — and keep them.

Companies already seem to be catching on. A survey by Human Resource Management found that 8 percent of U.S. workplaces let employees bring their pets to the office, which is up 5 percent from 2013.

PHOTO BREAK: 11 animals that mate for life

Pet-friendly employers include Amazon, Ben & Jerry’s, Google, Clif Bar, Build-A-Bear, Petco, the Humane Society and Etsy, among others. In addition to welcoming dogs — and often cats — to the office, some companies offer pet services and a few provide pet health insurance.

Currently 57 percent of millennial households have a dog or cat, and 20 percent say they intend to adopt a canine companion or feline friend soon.

Both millennials and boomers report that they think of their pets as family, but millennials spend more on their animals and say that caring for them is preparation for future responsibilities, namely having children.

"There is a huge demographic shift happening in the U.S.," Ben Huh, former CEO of the Cheezburger Network, told TechHive. "People are having children later and also living longer, which gives us more opportunities to treat our pets as replacement kids."

The pros of office pets

It’s well known that pets offer numerous health benefits for their owners, including lower blood pressure and a decreased risk of stroke and heart attack, but pets can be an advantage to office environments as well.

Animals in the office encourage exercise breaks, and the presence of a cat or dog can lower stress levels, boost morale and even improve communication and collaboration among employees.

A 2010 Central Michigan University study discovered that when a dog was present during team-building exercises, people rated their teammates higher on measures of trust and cohesion.

And a 2012 study of a group of Greensboro, North Carolina, employees found that on days dogs came to the office, stress levels decreased. On days dogs were absent, stress levels rose among the dogs’ owners.

"Dogs in the workplace can make a positive difference," Randolph Barker, one of the study authors, said in a news release. "The differences in perceived stress between days the dog was present and absent were significant. The employees as a whole had higher job satisfaction than industry norms."

And all those positive benefits can pay off for companies too. A 2008 survey by the American Pet Products Manufacturers Association concluded that companies that allow pets in the workplace not only have employees who are more willing to work longer hours, but also a lower rate of employee absenteeism.

With their pets at their side, employees are better able to cope with stress, and they don't have to run home to give their cat medicine or take the dog for a walk.

"Employers are starting to realize that having a millennial bring ... a pet to work, you wind up getting a more focused employee, you get someone more comfortable at the office and a person willing to work longer hours," Bob Vetere, president and CEO of the American Pet Products Association told CNBC.