A study—published in the Journal of Positive Psychology—examines the relationship histories of 7,532 people followed from ages 18 to 60 to determine who reported to be happiest at the end of their lives.

“People often think that they need to be married to be happy, so we asked the questions, ‘Do people need to be in a relationship to be happy? Does living single your whole life translate to unhappiness? What about if you were married at some point but it didn’t work out?,’” says William Chopik, assistant professor of psychology at Michigan State University and coauthor of the paper. “Turns out, staking your happiness on being married isn’t a sure bet.”

Chopik and Mariah Purol, a master’s student in psychology and study coauthor, find that participants fell into one of three groups: 79% were consistently married, spending the majority of their lives in one marriage; 8% were consistently single, or, people who spent most of their lives unmarried; and 13% had varied histories, or, a history of moving in and out of relationships, divorce, remarrying, or becoming widowed. The researchers then asked participants to rate overall happiness when they were older adults and compared it with the group into which they fell.

“…if the goal is to find happiness, it seems a little silly that people put so much stock in being partnered.”

“We were surprised to find that lifelong singles and those who had varied relationship histories didn’t differ in how happy they were,” says Purol. “This suggests that those who have ‘loved and lost’ are just as happy towards the end of life than those who ‘never loved at all.’”

While married people showed a slight uptick in happiness, if the consistently married group answered a 4 out of 5 on how happy they were, consistently single people answered a 3.82 and those with varied history answered a 3.7.

“When it comes to happiness, whether someone is in a relationship or not is rarely the whole story,” Chopik says. “People can certainly be in unhappy relationships, and single people derive enjoyment from all sorts of other parts of their lives, like their friendships, hobbies, and work. In retrospect, if the goal is to find happiness, it seems a little silly that people put so much stock in being partnered.”

If someone longs for a lifelong partner to start a family and build a happy life together, Chopik and Purol’s research suggests that if that individual isn’t completely happy to begin with, getting married won’t likely dramatically change it all.

“It seems like it may be less about the marriage and more about the mindset,” Purol says. “If you can find happiness and fulfillment as a single person, you’ll likely hold onto that happiness—whether there’s a ring on your finger or not.”