Researchers have followed over 700 people since 1938 to find the keys to happiness. Here’s what they discovered

“When we sacrifice our [relationship], that's when we end up regretting it, and living a life that isn't as good as we might have.”

If someone asked you which option would make for the most pleasant train ride possible which would you choose—spending your commute keeping to yourself or striking up a conversation with one of the unpredictable strangers in the seat next to you?

Many of us would choose to sit back with our headphones in because the thought of having to converse with someone we don't know is scary. We assume the worst, Dr. Robert Waldinger, a professor of psychiatry at Harvard Medical School at Massachusetts General Hospital and co-author of The Good Life, tells Fortune.

His book uses this question to illustrate how we typically expect new social interactions to go. We often assume they will be negative or unpleasant due to the uncertainty that arises when we reach out or lean in to form a new connection. We fear rejection. However, in a study from the University of Chicago, people who decided to strike up that conversation rated their commute as more pleasant than their average one, ultimately surprising themselves, Waldinger and his co-author Marc Schulz write.

“We seem particularly bad at forecasting the benefits of relationships,” the co-authors write. “A big part of this is the obvious fact that relationships can be messy and unpredictable. This messiness is some of what prompts many of us to prefer being alone.”

In The Good Life, Waldinger and Schulz distill what makes people find happiness from a study beginning in 1938 following the lives of 724 Harvard students and low-income boys from Boston in the world’s longest scientific study of happiness to date, according to the researchers. The ongoing study, which has expanded to include the spouses and children of the original participants, consists of over 2,000 people.

The researchers gathered participants’ health records every five years, conducted DNA tests along the way, and received questionnaires about their lives and well-being every two years. Roughly every 15 years, the researchers met the participants in-person for an interview. The researchers followed the participants' lives in hopes of finding the key to happiness. It wasn’t, in fact, good health.

One thing instead became irrefutable: the strength of people's relationships most accurately predicted their happiness throughout their lives. They are “intrinsic to everything we do and everything we are,” the authors write.

Now, that doesn’t mean you must strike up a conversation on a busy train car to have a happy life. Instead, Waldinger says he wants to show how easily, and subconsciously, we bypass the chance to connect when swept up by the hustle of life.

When the participants in the happiness study were asked how they overcame adversity—illnesses, war memories, and losses—their connections always remained a cornerstone of hope in their lives, whether they recalled the person who lent them money when they didn’t have anywhere to turn or the soldier who kept them afloat when they fought (many of the participants served in war). As they aged, the participants who shared regrets mainly bemoaned how little time they spent with family and friends and how much they cared about the seemingly trivial—career success and money.

“It's not that accomplishment isn't important and satisfying. It is,” Waldinger says. “But when we sacrifice our [relationships], that's when we end up regretting it, and living a life that isn't as good as we might have.”

If you desire stronger connections, you’re in luck because the researchers say it's never too late to improve your relationships, whether it be prioritizing new connections or fostering old ones.

Our social lives demand exercise.

“Social fitness” is the ability to take stock of your relationships and work on them through time, Waldinger says. Which ones energize you? Who do you appreciate and how can you incorporate them into your life in new ways? Do you want to make new connections? Even the people we consider close friends can begin to slide down the priority list as we age.

“We grow. We change. Our lives change,” Waldinger says. “But some of it is that we can be intentional, saying, ‘this person I want to keep in my life.’ That's the intentional part that I want to point to.”

The best way to improve your “social fitness” is to build relationship time into your weekly schedule, as you would a session at the gym or a work meeting. Waldinger and Schulz aren’t only co-authors but friends, and they talk every Friday at noon.

“We talk about our work and we talk about writing this book, but we talk about our kids and we talk about things that are bothering us in our personal lives. We talk about everything,” he says. “That phone call is automatic, and we actually have to cancel it if there's a reason. It’s a huge factor in how we’ve been able to stay close.”

It’s never too late to start finding that time to carve in a quick weekly phone call with someone you miss and appreciate. Waldinger also encourages making a friend at work, by asking someone to hang out and getting to know them over a shared interest or by solving a professional issue together.

For people who want to make new connections, Waldinger suggests putting yourself into more positions where that may be possible. It can be trickier if you’re working from home, moving to a new city, or navigating a dynamic where you don’t have a close point of contact. But putting ourselves out there is still within reach, Waldinger says. Join a local book club or intramural team, call a friend even for a short amount of time weekly or monthly, or plan your next visit to someone who lives far from you (even introducing yourself to the local barista you frequent or complimenting a stranger can boost mood and become a micro-act of joy).

Technology can bring people together who wouldn’t otherwise cross paths, like my mom and one of her best friends who connected in an online support group for those grappling with chronic pain. They now make an effort to have calls monthly and even travel to each other’s hometowns once in a while. But technology can also dilute the true image of happiness, falsely equating the level of luxurious and unrealistic highlights of people’s lives to their happiness level.

“We get messages all day, every day, about things that are supposed to make life good that turn out not to make life good,” Waldinger says, alluding to the borage of content celebrating material gadgets and personal successes.

Social media isn’t going anywhere, although it will inevitably take new forms, Waldinger says. Ask yourself how to be an active consumer over a passive one—which can help you avoid the feelings of FOMO and use technology to cultivate relationships rather than feel more distant from them or that you're not as happy as your peers. Check in with yourself after 10 minutes online, and ask yourself how you feel, he says. Notice if you feel more energized and excited by connecting with others or depressed and more lonely. It will give you an indication of which types of media benefit you and your relationships.

One of Wadlinger’s Zen teachers once said, “Attention is the most basic form of love.” Giving someone our attention seems simple, but it can easily be something we sidestep for more short-term mood boosts like a notification ding.

“The most precious thing we can give to somebody else is our undivided attention, but it's much harder to give that these days,” Waldinger says.

Stop, listen, and give eye contact when you’re engaging with someone. Waldinger says to eliminate the pressure of trying to perfectly understand someone or solve their problem. Listening without the need to jump in shows the other person we care more than we may think, he says.

Making new connections and cherishing old ones means accepting the vulnerability that comes with caring about someone and leaning on them when needed. If the greatest joys in life come from our memories with others, we can't forgo the chance to have someone by our side because we never want to open up or seem like we ask for too much.

“One of the harder things for some people to learn is how to give help, and—even harder for others as they grow older—how to receive help,” the authors write. “...as we age, we become concerned both that we’re too needy and that people won’t be there for us when we really need them.”

Relationships are complex, and they take vulnerability to sustain. It makes sense why we sometimes stray from genuine connection out of fear, but The Good Life reminds us that they are worth keeping and finding—at any age.

“Relationships don't keep us happy all day, every day because nobody's happy all day, every day,” Waldinger says. “What they do is they build a bedrock of well-being. They build a safety net. They build a sense that I got people in my life when I need them.”

For more on improving social health:

This story was originally featured on Fortune.com