“Workers have changed faster than the workplace,” Mr. Bersin said. So companies, especially older ones, are trying to figure out how to hold on to good employees — if not for the remainder of their working lives, then at least for a healthy part of them.

The premium that employers have placed on retention reflects the high cost of turnover: Experts estimate it can cost as much as twice an employee’s salary to recruit, hire and train a new worker.

And close friends often follow one another out the door. According to John J. Sullivan, a professor of management at San Francisco State University who specializes in human resource issues, when one person leaves, several often follow suit. “So it’s not replacing one person, it’s replacing three to five,” he said.

In any work force, said Professor Sullivan, there is a percentage of people whom employers “would go all out to keep, a percentage whom they would regret would leave but would let them go, and the Homer Simpsons” — or employees who should have already left.

“If you don’t readapt or relearn, it’s time to go,” he said.

Despite the conventional wisdom that those in their 20s and 30s are happy to change jobs every two to three years, research shows that may be more myth than reality.

“Everyone still wants to love and be inspired by their job,” Mr. Hecht said. “What has changed is that people have a lower tolerance than ever if they don’t feel fulfilled.”

In the past, managers had to rely on anecdotes to find out why people were walking out the door. But now, the ability to do online surveys, crunch large amounts of data and track trends means “we have a science behind what works and what doesn’t,” he said.