Every year it seems one pop song gets labeled the "Song of the Summer."

Last year, Despacito. The year before, either One Dance, or maybe This is What You Came For. The year before that, Cheerleader

Now, a group of researchers in California say they've figured out how to predict ahead of time what songs will become hits--maybe even before they're recorded.

Writing in the journal Royal Society Open Science, the team from the University of California, Irvine, studied 504,810 pop songs that were released between 1985 and 2015, comparing the 4 percent that spent at least one week on the Top 100 Singles Chart in the United Kingdom during that time, to the 96 percent that were less commercially successful. 

The analysis came down to 18 characteristics of each song, cataloging which attributes the more successful songs had. Then, more impressively, they were able later to go backward, choose any song among the 504,810 without knowing whether it had been a hit, and predict with 86 percent success whether it would be among the Top 100s.

Here are the characteristics, the reverse-engineering, and what it means for music.

Less angst, more success

First off, the tone was very important. Sad, self-referential, slow songs did very poorly compared to more upbeat songs. 

This, despite the fact that songs in general exhibited "a clear downward trend in 'happiness' and 'brightness,' as well as a slight upward trend in 'sadness,'" during the time they studied.

"Successful songs are happier, brighter, more party-like, more danceable and less sad than most songs," the research team wrote in the study.

Women do better than men

Overall, female singers performed better than male singers.

But it wasn't enough simply to be female, or even to be a woman singing an upbeat song.

"Successful songs are, for example, 'happier', more 'party-like', less 'relaxed' and more 'female' than most, this does not necessarily allow us to naively predict that a particular 'happy, party-like, not relaxed' song sung by a female is going to succeed," the team wrote.

Superstar status!

There are a bunch of other attributes, but they get kind of catalog-y, so I'll just list them at the end of this article. 

The impressive part however is that afterward, by choosing any song on the list without identifying whether it had made the Top 100 list or not, they could predict hits about 74 percent of the time.

Accuracy improved markedly when they added another factor they called "superstar status," which basically meant considering whether the the artist on the song had previously been on the list with another song.

Add that characteristic, and predictive success increased to 86 percent.

18 factors 

Overall, there were 18 characteristics included in the analysis. These included the music's timbre, tonality, and danceability, whether it included voices or was purely instrumental, and whether the singer (if any) was predominantly male or female.

There were also eight more mood characteristics (things like "sad/not sad" or "party/not party") and five genre and rhythm characteristics.

'Hit songs, books and movies are many times more successful than average," the authors wrote, "yet experts routinely fail to predict which products will 'succeed'."

By using machine learning and studying the characteristics of so many songs however, they think they may have a breakthrough. 

Does it work in real life? Maybe we'll know at the end of the summer.