A paper being published Friday in a British medical journal concludes that happiness is contagious - and that people pass on their good cheer even to total strangers.
American researchers who tracked more than 4,700 people in Framingham, Mass., as part of a 20-year heart study also found the transferred happiness is good for up to a year.
"Happiness is like a stampede," said Nicholas Christakis, a professor in Harvard University's sociology department and co-author of the study. "Whether you're happy depends not just on your own actions and behaviors and thoughts, but on those of people you don't even know."
While the study is another sign of the power of social networks, it ran through 2003, just before the rise of social networking Web sites like Friendster, MySpace and Facebook. Christiakis couldn't say for sure whether the effect works online.
"This type of technology enhances your contact with friends, so it should support the kind of emotional contagion we observed," he said.
Christakis and co-author James Fowler, of the University of California in San Diego, are old hands at studying social networks. They previously found that obesity and smoking habits spread socially as well.
For this study, published in the British journal BMJ, they examined questionnaires that asked people to measure their happiness. They found distinct happy and unhappy clusters significantly bigger than would be expected by chance.
Happy people tended to be at the center of social networks and had many friends who were also happy. Having friends or siblings nearby increased people's chances of being upbeat. Happiness spread outward by three degrees, to the friends of friends of friends.
Happy spouses helped, too, but not as much as happy friends of the same gender. Experts think people, particularly woman, take emotional cues from people who look like them.
Christakis and Fowler estimate that each happy friend boosts your own chances of being happy by 9 percent. Having grumpy friends decreases it by about 7 percent.
But it also turns out misery don't love company: Happiness seemed to spread more consistently than unhappiness. But that doesn't mean you should drop your gloomy friends.
"Every friend increases the probability that you're at the center of a network, which means you are more eligible to get a wave of happiness," Fowler said.
Being happy also brings other benefits, including a protective effect on your immune system so you produce fewer stress hormones, said Andrew Steptoe, a psychology professor at University College London who was not involved with the study.
But you shouldn't assume you can make yourself happy just by making the right friends.
"To say you can manipulate who your friends are to make yourself happier would be going too far," said Stanley Wasserman, an Indiana University statistician who studies social networks.
The study was only conducted in a single community, so it would take more research to confirm its findings. But in a time of economic gloom, it also suggested some heartening news about money and happiness.
According to the research, an extra chunk of money increases your odds of being happy only marginally - notably less than the odds of being happier if you have a happy friend.
"You can save your money," Christakis said. "Being around happy people is better."