Love is well and good, but there’s no guarantee you’ll die, Notebook-style, with whomever you decide to spend the rest of your life with. In the United States, more than 20 percent of first marriages end within five years, and 48 percent of marriages break 20 years in. And according to a study released Tuesday, the ratio of males to females in the workplace could play a role in a marriage’s demise.

In the journal Biology Letters, sociology researchers from Stockholm University present evidence that relationships become less stable when there are lots of opportunities to meet a new mate in the workplace. The study showed that married individuals have a higher risk of divorce when the “adult sex ratios” of their office present more members of the opposite sex. This proved especially true for men, especially those who are more highly educated.

Study co-author and postdoctoral researcher Caroline Uggla, Ph.D. tells Inverse that “the assumption is that men who work in heavily female-biased sectors will have more opportunity to interact with the opposite sex than men who work in male-biased sectors, and vice versa.” The study did not incorporate data on the types of interactions that went on in the workplace, but it pointed to a clear correlation regardless.

breakup
Danish data shows breakups happen when men are in a workplace with a lot of women.

Uggla and her colleague Gunnar Andersson, Ph.D., a demographics professor, used data on all of the individuals in Denmark that married opposite-sex spouses between 1981 and 2002 and actively worked during any of those years. The data showed thousands of divorces and very clear trends, some of which didn’t have to do with sex ratios at the office. For example, the divorce rate was 40 percent lower for individuals that got married after age 40 than it was for those who got married between the age of 16 and 22. People who lived outside of Copenhagen had a 30 percent lower divorce risk, and highly educated people had about half the divorce risk of those with a lower education.

But the most interesting — and worrisome — findings of the study revealed the link between the sex composition of a professional sector and the divorces that occurred among people working in that sector. Those associated with the highest risk of divorce for both men and women were the hotel, restaurant, and ‘manpower’ sectors, while those that had the lowest risk of divorce for both men and women were the farming, pharmaceutical, and library sectors. (That’s great news if you’re already on FarmersOnly.com.)

While the team found that highly educated people on average were less likely to become divorced, the statistics became a little less clear-cut when the data were broken down by sex.

“Results indicate than an abundance of partners of the opposite sex in one’s occupational sector is more strongly associated with higher risk of divorce for men, especially those with high education, while for highly educated women, the associated is weak or non-existing,” the researchers write.

There are several reasons this could happen, the team writes. One could be that people tend to partner with people that have the same educational level and are within the same field as themselves, and when there are a bunch of people who fit that criteria at work, it may prove to be too tempting. It could also be that being around more members of the opposite sex simply means there are more opportunities to meet a new partner. Of course, the study was carried out only on Danish people, so “we need more studies with data of this high quality that can speak to whether the pattern observed here holds for other cultural contexts,” says Uggla.

This is not to say that working in an environment that surrounds you with many members of the opposite sex will cause you to get a divorce. That would be pretty backwards. But if you are going through some relationship issues, scientists luckily have some advice on how to deal with that heartache.