Doctors and lawyers are among America’s loneliest workers, followed by people who work in engineering and science, according to a survey published in the Harvard Business Review.

Researchers surveyed 1624 full-time employees on the degrees of loneliness and social support they experienced daily, both in and out of the workplace. Respondents with graduate degrees reported higher levels of loneliness than those who had completed only undergraduate studies or high school. Lawyers and doctors were the loneliest by far, reporting levels of loneliness 25% higher than respondents with bachelor’s degrees and 20% higher than those with PhDs.

“The life of a doctor is a lonely one,” Dr. Christopher Thompson, who runs the YouTube channel Student Doctor Thompson, said in a video called The Loneliness of Medicine. “Your friends have moved on. That tends to happen after you neglect them for four years of pre-med, four years of medical school, and four years of residency.” And after all those years immersed in study and clinical training, Thompson noted, physicians tend to have little in common with anybody except their medical colleagues.

Medical students often share feelings of isolation and loneliness on online forums. “Medicine is a lonely road and one which we all travel by ourselves,” said one student. Another acknowledged knowing there would be long hours of study, “but what has hit me hard now that I’m here is the feeling of isolation.” One medical student worried that the loneliness of medical school was just the beginning of a life of loneliness for a doctor. “The reality is, in medicine and any other demanding competitive career, one is bound to spend lots of time alone, maybe even most of most days alone … You’re also bound to face a lot of challenges that none of your close friends (or even spouse) will understand.”

By contrast, workers in marketing, sales and social work are the least lonely, likely because these fields are highly social, according to the survey authors. Other demographic factors, including age, sex, race and geographic location, “didn’t seem to matter all that much.” Higher earners were slightly less lonely, “but only barely.”

“The portrait of loneliness that emerged from this study is sobering,” the authors said. Lonelier workers reported lower job satisfaction, fewer promotions, more frequent job switching and a higher likelihood of quitting their jobs. Other studies have also found that lonelier workers are less productive and quit more often.

The health costs of loneliness are also high. Research has linked social isolation to increased risks of cardiovascular disease, dementia, depression and anxiety. One study showed loneliness has similar health effects to smoking 15 cigarettes a day. Social isolation is considered such a growing problem in the United Kingdom that the government appointed a Minister for Loneliness whose tasks will include helping to develop “the evidence-base around the impact of different initiatives in tackling loneliness, across all ages and within all communities.”

Building a shared sense of meaning may help counteract loneliness in the workplace, according to the authors of the Harvard Business Review survey. “While social support was positively associated with raises and lower turnover, employees who reported feeling a shared sense of meaning with coworkers showed even greater gains on both metrics,” they said. Focusing on collective wins “avoids leaving some left out in the cold.”