No one has ever defined what makes a best song at the Oscars.

Is it great music and lyrics that relate to the movie’s story? Does the tune need to be catchy or memorable? Is the context of the scene important? Does commercial success give it a leg up?

Depending on who you ask, the answer is some, or all, of the above.

This year’s five Oscar nominees include two from the musical “La La Land,” one from a documentary (“Jim: The James Foley Story”), and two from animated films (“Moana” and “Trolls”).

Of the noms from animation, one is by someone who is arguably today’s hottest Broadway star (Lin-Manuel Miranda), the other by a Grammy-winning artist (Justin Timberlake) that also happens to be the year’s biggest-selling song.

Says composer Charles Bernstein, senior governor of the Academy’s music branch, “An Oscar-worthy song should creatively serve and enhance the film, but ideally it should also stand alone as a great song separate from the film.”

But how to define that?

Oscar rules demand “a substantive rendition,” and ask voters to judge based on “effectiveness, craftsmanship, creative substance, and relevance to the dramatic whole, and only as presented within the motion picture.”

The Academy’s 270 music-branch members — composers, songwriters, and music editors — choose the nominees. This year they drew from a pool of 91 qualified entries. But the entire 6,000-plus Academy membership gets to vote once the nominees are announced. So how do they choose a best song?

“It varies from year to year, narrative to narrative, film to film,” says a seasoned Oscar consultant. “I do think the film matters. If I had to guess, it’s an emotional vote, as with ‘Let It Go’ [from 2013’s ‘Frozen’] — it just made you feel.”

A longtime music-branch member puts a song’s qualifications in more analytical terms: “How well does the song contribute to our understanding of the film’s plot, moral, wider implications, etc.? The song is there to serve a purpose, and we should be focusing our judgment on how well it succeeds in that mission.”

And yet another Academy voter points to the diversity of standards among those who cast Oscar ballots. “Some are tuned in and others are just not sophisticated,” → he states. After decades of listening and choosing, he says, “I vote my taste.”

Theoretically, commercial success should be irrelevant. But is it? Twice in the previous four years, for example, the winners have been hit songs sung by major artists for James Bond films (Adele for “Skyfall,” Sam Smith for “Spectre”). This year, if voters ask their kids which song to choose, they might be urged to pick Timberlake’s chart-topping happy-dance-number “Can’t Stop the Feeling!” from “Trolls.”

And what happens when two songs are nominated from the same film? “La La Land” has both “City of Stars” and “Audition (The Fools Who Dream)” in contention. Conventional wisdom says that the two songs could easily split the vote and cancel each other out, opening the door for one of the other three nominees.

Yet history doesn’t necessarily agree. Ten times in the past 30 years, two or even three songs from the same film have been nominated, and six times a song from that film has won (“The Little Mermaid,” “Beauty and the Beast,” “Aladdin,” “Philadelphia,” “The Lion King,” “Slumdog Millionaire”).

And there are other factors. Miranda, one of the most talked-about personalities in the arts for the past year (need we say “Hamilton”?), could achieve the rare EGOT distinction, should he win for “How Far I’ll Go” from “Moana.” He already has an Emmy, a Grammy, and a Tony.

Don’t count out the much-admired Sting, either, even though “The Empty Chair,” the song he co-wrote with J. Ralph, is from a documentary — Melissa Etheridge’s “I Need to Wake Up” from the doc “An Inconvenient Truth” won in the category a decade ago.

“I fear what Academy voters think about is not what they should think about,” says the longtime music-branch member. “A song’s popularity, its hummability, coverage in the media, the popularity of the film, invitations to special screenings hosted by the rich and famous — all of these aspects contribute to the likelihood that members will vote for one particular song over another.”

One thing everyone seems to agree on: The 2016 crop is the best in years. Among the strong competitors that didn’t make the final cut: the Pharrell Williams songs from “Hidden Figures”; the on-camera performances in “Sing Street” and “Rules Don’t Apply”; and new songs from such legendary, Oscar-winning tunesmiths as Burt Bacharach and Marilyn and Alan Bergman.