Moods can spread online just like they can face to face.

A new study by researchers at the University of California, Yale and Facebook has found moods can spread virally through social media like Facebook.

The researchers took a look at data from millions of Facebook users on the impact of rainy days. For ever one person directly affected by rain, one or two others would also feel the impact.

Positivity spreads more than negativity: Every sad post generates an extra 1.29 more negative posts than normal, but happy posts have a stronger impact - an extra 1.75 positive posts are generated.