Nothing has more of a negative impact on my workday than forgetting my headphones.

Like most people, music is a huge part of my life. I listen to the most music while I work, sifting through playlists, from neo classical to indie to electronica on what seems like a never-ending search for the perfect tunes to keep me in the zone.

We spend so many of our days at work, and so much of our workdays in front of a screen, that music has become indispensable in keeping us happy, motivated, and productive.

But are all songs made the same? Or are there perfect tracks for certain tasks?

Why we’re addicted to music

I’m sure you don’t need a scientist to tell you how music can help you get through a work day.

We turn to our favorite songs in times of need: when we’re feeling low and need a pick-me-up, or when we’re happy and want to keep the flow going.

As neuroscientist and musician Jamshed Bharucha discovered, there’s something primal about why we love music. Bharucha found that creative domains such as music allow humans to connect in a synchronized way, helping us develop a group identity and become more likely to work together.

A recent study of preschoolers furthered this idea. The study paired children together in sets of two with one group told to sing a song together, while the others just walked (or crawled) around together.

The pairs were then given tubes full of marbles that were designed to empty once the children started playing with them.

Looking at the behavior of the pairs, the researchers found that those children who sang together were more cooperative in helping to clean up the marbles and concluded that music may have evolved as a way of fostering a sense of community and developing immediate empathetic concern.

But our love of music isn’t just cultural. When you listen to your favorite tracks, a part of your brain called the nucleus accumbent activates, triggering a release of the ‘motivation and pleasure chemical’ dopamine, which lives in a group of neurons in your brain called the Ventral Tegmental Area (VTA):

Dopamine is the same chemical that gets released when you eat your favorite food or when you get a new follower on Twitter, causing you to want more (and more, and more).

Yet, just like after your first 100 or so followers (or your 1000th pizza), there is a law of diminishing returns. When you first hear a new song that you love, more dopamine is released and you get more excited than if you were to listen to one of your ‘old favourites’.

So does music actually help us work?

Music has a powerful relationship to our primal needs of connecting with others, but how does this translate over to our workdays?

A study published in the Journal of Music Therapy found that listening to your favorite type of music lowers your perception of tension, making you more likely to be happier and productive during stressful situations (like at work).

But beyond just ‘listen to music you like’, there are some golden rules for picking the perfect song for the type of work you’re doing.

1. For simple tasks, choose music you’re heard before

A study published in the Journal of Neuroscience of Behaviour and Physiology found that a person’s ability to recognize images, letters, and numbers was faster when rock or classical music was playing in the background compared to when there was no music.

Similarly, another study found that workers on an assembly line were more happy, efficient, and made less errors when listening to music.

Other researchers documented that performance improves while listening to music if the task is perceived as ‘simple’ or monotonous like answering email or copying data into a file.

When it comes to repetitive or boring tasks, as long as you’re listening to something, you’ll get them done faster.

2. Lose the lyrics when you’re learning

For more immersive and mentally tasking jobs, classical or instrumental music has been shown to enhance mental performance more than music with lyrics.

If the task at hand is especially complex, shutting out all outside stimuli (including music) is your best bet. Even faint musical chords playing in the background can cause cognitive interference—when your performance declines because your brain must dedicate resources to help you process both the task and the music.

3. Jam out during work you love

The magic of music comes into play the most when you’re an expert at what you’re doing. Even if it’s something as challenging as surgery.

A study in the Journal of the American Medial Association reported that surgeons worked more accurately when music they liked was playing in the background.

But you don’t have to be a medical professional to benefit from good jams. Bestselling author Stephen King jams out to Metallica and Anthrax while writing.

4. Hit the sweet spot during creative work

When you need to focus, studies suggest that songs paced at 50 to 80 beats per minute are best.

Dr. Emma Gray of The British CBT and Counseling Service worked with Spotify to conduct research on the benefits of certain types of music.

Gray’s research found that musical tempo in the range of 50 to 80 beats per minute can help induce the alpha state in your brain. Your mind becomes calm, alert, and concentration is heightened.

Alpha waves have also been associated with the ‘eureka moment’ — a flash of unique insight that triggers when you enter a relaxed, yet focused state of mind.

In her findings, Gray notes that it’s not the musical genre but the tempo that has the most to do with creating a state of flow.

To sum it all up, here’s a graph of what kind of music to listen to depending on what task you’re doing:

➤ This post originally appeared on Crew

Read next: The secret to insane productivity? Will power

Image credit: Corey Blaz

Read next: Big data and creativity: What we can learn from 'House of Cards'