Get the latest federal technology news delivered to your inbox.

A new study adds to the growing body of research on the fallout of our socializing online.

Social media has irrevocably changed the nature of friendship, in that we now split our time between virtual relationships and real ones. Now, a big new study adds to the growing body of research on the fallout of our socializing online: The more we use Facebook, the less happy we feel.

From the moment we awake, the first thing we’re tempted to do is “tap on that little blue icon,” Holly B. Shakya, who studies public health at the University of San Diego and led the new study, told the Harvard Business Review. “What impact does it have on you?”

Her team set out to answer that question through a study of more than 5,200 adults in the U.S., who were consulted three times over a period of two years. The study, published in the American Journal of Epidemiology in January, builds on existing research on social media and health that was limited by self-reported data. Shakya’s research is the first longitudinal study to directly analyze Facebook data and compare it to users’ real-world networks. The researchers’ questions were embedded within a wider Gallup survey.

For a portion of the group that allowed access to their Facebook data, the researchers studied three measures of social network use: How much users “liked” others’ content, how much they clicked on links and their use of status updates. Those who didn’t grant access to their Facebook accounts were questioned about their real-world friendships and health. To measure wellbeing, respondents answered questions on life satisfaction, mental health, physical health and body-mass index.

The more hours Facebook users logged on the social network over time, the more their sense of wellbeing and happiness declined, according to the researchers. Facebook users who spent a very large amount of time on the social network showed meaningful decreases in physical and mental health compared to the average. (Statistically speaking, those with Facebook use one standard deviation above the average showed 4-8 percent of a standard deviation decrease in physical and mental health.)

Meanwhile, participants who cultivated real-world friendships over time (measured by, for instance, who they reported spending free time with and who they talked to about serious matters in their lives) were happier overall. Investing more into Facebook relationships appeared to take a toll on offline friendships, the researchers found, perhaps because people have only so much time and energy to spend on either one.

What’s driving the differences between how online and offline relationships make us feel isn’t clear. But Drawing on previous research, Shakya and her team made some informed guesses. For example, Facebook users tend to see meticulously curated versions of people’s real lives, which might make their own lives feel worse by comparison.

The “self-comparison effect” is likely compounded by “time lost in more meaningful relationships,” Shakya told Quartz. In other words, worrying about how your life stacks up to others on social media costs you time with real friends.

Facebook and Twitter have dabbled in tools that help people with mental health problems who use the networks, especially those trolled and bullied in other ways. But the subtler sadness that comes with our social media addiction—that will be harder to solve.