It’s always seemed a decent guess that we let political affiliations influence our attraction to a potential valentine. But now we have numbers. A recent study demonstrates that having similar political beliefs makes us more likely to be interested in a person when we view his or her online dating profile.

Neil Malhotra, a political economist at Stanford Business School, says he became curious about the question as he watched partisan polarization increase over the past several years. “It seemed like the country was getting more divided,” he says. He kept hearing friends say they would never date someone from across the aisle. One woman ended a relationship that was going well after she discovered the guy was a conservative. “I had a suspicion,” says Malhotra, “this polarization was influencing our lives in ways that went beyond elections.”

In the first experiment, 197 subjects were brought into a Stanford behavioral lab and shown profiles of fictional people. The profiles were made to look just like those posted on dating websites. The researchers could play with different variables—such as keeping the photo the same while switching the fictional person’s religion, level of educational attainment, or political preference.

The results showed that religion could cause a 4.5 percent swing in how eager a subject was to date a fictional prospect. Education had a 3 percent effect. And matched political ideology also had a 3 percent effect. Even if the fictional person’s photo stayed exactly the same, ratings of physical attractiveness increased by 2.2 percent if the fake person listed a political preference that was the same as the profile viewer’s.