From toddlers bopping along to the latest pop hit to grandparents rediscovering the songs from their long-lost youth, listening to music has the power to stir our emotions at any age.

Scientists have long known about the influence of music on mood, even using pop songs like New Order's “Bizarre Love Triangle” and Sinéad O'Connor's “Nothing Compares 2 U” to arouse joy or sadness in subjects during psychological studies. But why do certain combinations of sounds have such a strong effect on the way we feel? How does the brain translate music into an emotion?

In an effort to find some answers, a Dutch neuroscientist has tackled the analysis of one very specific type of music: the feel-good song. Jacob Jolij, an assistant professor in cognitive psychology and neuroscience at the University of Groningen, has come up with a mathematical formula that describes the anatomy of these songs in order to investigate why they make us feel so warm and fuzzy inside. Using a database containing 126 of the most popular feel-good songs from the last 50 years, Jolij applied statistical methods to see which characteristics of these tunes are responsible for their good vibes.

“I looked at the scientific literature in terms of what makes us feel good — primarily tempo and key,” he said. “So I went through all the scores and sheet music from the songs to look at key and tempo, but also lyrics. Then I tried to fit a regression model, a mathematical technique, to see which songs could be listed as feel-good.”

The project was commissioned by British consumer electronics brand Alba, who surveyed 2,013 adults in the United Kingdom on whether they use music to uplift their mood and which feel-good songs they preferred from several decades. To take the results a step further, Alba sought out a researcher that could tinker with the database of responses and output a mathematical formula for the ultimate feel-good song.

Jolij's final equation of Feel Good Index (FGI) includes the sum of all positive references in the lyrics, the song's tempo in beats per minute and its key. The higher a song's FGI, the more feel-good it is predicted to be. Happy lyrics, a fast tempo of 150 beats per minute (the average pop song has a tempo of 116 beats per minute), and a major third musical key all help create music we perceive as brimming with positive emotion.

“The number one feel-good song is 'Don't Stop Me Now' by Queen — it's quite a bit faster than the average song, plus it's in a major key that works quite well, and if you look at the lyrics, they are very positive,” said Jolij. " 'Don't Stop Me Now' is an excellent example of a feel-good song.”

Even in the complete absence of lyrics, music can carry powerful emotional connotations. Beats automatically activate motor areas of the brain, according to magnetic resonance imaging studies, and propel our bodies to move spontaneously to the rhythm. Therefore, fast-tempo songs are directly associated with more energy, movement, and dancing, which are typically linked to being in a joyful state.

However, other characteristics of music such as key are not as well-understood.

“That's a bit of a mystery, why we assign major chords with positive emotions and minor chords with negative emotions. There's definitely an element of learned association, although there are some people who claim it's more of a biological thing,” said Jolij. “It's still one of the big questions in musicology.”

Despite the open questions, there is little debate about the intertwining relationship between music and emotion — and therefore, music can indirectly influence our perception and actions. As part of a 2014 experiment, smokers were made to look at negative imagery while listening to Bartok’s “The Miraculous Mandarin” and Prokofiev’s “Battle on the Ice” — looming, frenetic and harsh classical pieces that stir up feelings of uneasiness and anxiety within the listener — then rated their levels of cigarette craving. Participants craved a smoke to a much greater extent after the experiment, despite having just had one.

Another study from 2014 looked at the potential power of music to soothe away symptoms of road rage, finding that low-energy songs significantly decreased systolic blood pressure during a simulated traffic jam. So while easygoing songs like The Temptations' “Just My Imagination” had this calming effect on drivers, peppy tunes such as Depeche Mode's “Just Can't Get Enough” did not.

Jolij's own research focuses on certain factors — including musical sound — that influence how humans perceive their surrounding environment. In his 2011 study published in PLOS ONE, he had subjects listen to music clips before taking on a difficult visual task, where they had to pick out a hidden face within a very grainy image. The experiment was designed to investigate how music-induced moods can rub off on our visual perception.

“We found music to be a very effective way to manipulate mood,” Jolij said. “When they were happy, they were better at recognizing happy faces, and when they were sad, they were better at seeing sad faces. Being in a good mood actually helps your brain pick up positive information.”

Instead of running the risk of not catering to all his subjects' tastes, he asked them to bring in their own mood-stimulating music instead of choosing the same songs for everyone. Jolij emphasizes that we have a strong tendency to attach memories to certain pieces of music — for instance, first dance songs at a wedding, songs famously featured in movies, or music introduced to us by specific people.

“Many people brought classical music to make them sad, in particular 'Requiem' by Mozart, saying this was played at the funeral of a friend or relative, or they would bring in music that they always listened to with an ex-lover,” said Jolij. “I can come up with this feel-good formula and give you the perfect feel-good song, but it does not take into account the associations you have with the song. It can’t predict your feel-good song, but I can predict what 1,000 people on average would say is their favorite.”

Here are the top 10 feel-good songs according to the formula:

Read More:

For more health news, you can sign up for our weekly newsletter here.