Once upon a time, nerds were given lazy storylines, made the butt of jokes, and only around to make the heroes look better by comparison. They weren't characters to be ired, they didn't possess traits that were desirable, and they certainly weren't cool. And yet, over the decades, the portrayal of nerds has evolved, despite the limitations of their narratives, to become people audiences cheer for, like Napoleon Dynamite, the socially awkward but heartwarming nerd who became a movie icon.

RELATED: Tina, Come Get Some Ham: 10 Behind-The-Scenes Facts About Napoleon Dynamite

The greatest movie nerds know their default social status and choose to ignore it. They unabashedly like what they like, and because of their interests in things like ectoplasm and flux capacitors, they're often important in ways that make them the heroes of their own stories. So many movies wouldn't have been the same without their nerds, the best of whom have been ranked here.

Data - The Goonies

Data from The Goonies holding belt of gadgets and looking determined.

Richard Wang (aka "Data") may seem like a very stereotypical nerd obsessed with technology, inventions, and science, but when the Goonies need help finding (and defending) treasure found using an old pirate map, he's the one with the most useful skills.

RELATED: Recasting The Characters Of The Goonies (If It Was Made Today)

Even before his friends find the treasure, he knows how to help them navigate the perilous path, and in the end, he's the most important person in their squad "setting booby traps" for anyone foolish enough to follow them.

Louis Tully - Ghostbusters

Louis Tully Rick Moranis in Ghostbusters 2 looking off to the side and speaking, looking worried.

Lovable, bumbling Louis Tully could have been an extremely forgettable character in Ghostbustersbut he manages to be part of some of the most iconic scenes in the movie, and even becomes a much larger part of the heroes' plot in Ghostbusters II when he becomes a fifth ghostbuster himself!

A lowly ant whose only happiness in life is when he gets to occasionally chat with Dana, his beautiful neighbor, Louis eventually becomes a very important person when he's possessed by the demon Vinz Clortho, the Keymaster, who (along with Dana/Zuul) opens the gate that will allow Gozer to travel across dimensions to Earth.

Professor Sherman Klump - The Nutty Professor

Eddie Murphy in full makeup as Sherman Klump

Shy, overweight, and awkward, Professor Sherman Klump is a brainy academic who's unlucky in love, so he makes himself a weight-loss serum to gain the attention of his coworker, Carla. Once he's imbibed the serum, 250 pounds instantly disappear off his frame and he assumes the persona of Buddy Love, a charismatic rake with a trim physique but a horrible personality.

Eventually, Buddy gets out of hand, and Sherman has to fight to overpower his alter ego and prevent him from ruining his relationship with Carla for good. Sherman is victorious not just because he outsmarts Buddy, but because he's a good person who ultimately embraces who he is, nerdiness and all.

Brian Ralph Johnson - The Breakfast Club

Brian with a pen up his nose in The Breakfat Club

The Breakfast Club endures through the decades because it represents teenage life in a timeless, accessible way. The Nerd, Brian Ralph Johnson, embodies the traditional tropes of his label, including being scholastically gifted and hardworking, but they're subverted by his openness to describe the pressure he's under to maintain them.

RELATED: 10 Things To Watch With The Cast Of The Breakfast Club

Brian candidly shares with the rest of the kids in detention how the omnipresent scrutiny from his parents, teachers, and even himself causes him physical and emotional suffering, including thoughts of ending his life. He shared a window into a nerd's soul, allowing nerds everywhere to empathize - and he wrote a damn fine manifesto.

Napoleon Dynamite - Napoleon Dynamite

Napoleon Dynamite standing in front of yellow lockers in school corridor.

A little oblivious at times, Napoleon Dynamite, nevertheless, is all heart when it comes to ing his friends and looking after his family (even Tina). He commits to helping his friend Pedro campaign to be Student Body President, and he discourages his conniving uncle from taking advantage of his grandmother.

Getting an impression of Napoleon's level of intelligence is a bit difficult, but he has an emotional intelligence that outweighs his booksmarts. He's an empathetic person who knows how to connect with a variety of people, and he has the self-confidence to show them that there's nothing wrong with being true to themselves.

David Levinson - Independence Day

Jeff Goldblum as David Levinson with a concentrated look staring at computer.

When humankind is threatened by an alien invasion in Jeff Goldblum, who's arguably made a career out of playing nerds, signs on to save the day as David Levinson, a satellite technician who becomes an integral part of the War of 1996.

Levinson improbably deduces that in order to take out the aliens' mothership and enable a train reaction to destroy its entire fleet, a craft from Earth will need to infiltrate it and plant a virus to ravage their technology. He embarks on the mission with Earth's most infamous fighter pilot and sets an example for nerds everywhere.

Hermione Granger - Harry Potter Series

Hermione Granger making a potion and looking determined as she looks into the camera.

Hermione Granger is a nerd and proud of it, never missing an opportunity to correct her classmates when it comes to the finer point of spell pronunciation, nor their scholastic efforts in the wizarding world ("It's leviOsa, not levioSA!").

RELATED: Harry Potter: 5 Best Hermione Granger Plans (& 5 The Worst)

If it wasn't for Hermione, who has the enviable ability to locate, condense, and apply tomes of complicated information, Harry, Ron, and many of her friends would never have been able to become the wizards they were destined to be. She's a nerd of action, who saves the day on more than one occasion with some of her masterful plans.

Evie Carnahan - The Mummy

Evelyn "Evie" Carnahan (Rachel Weisz) after she knocks down the bookcases in the library

Clumsy enough to be excluded from archaeological digs, but knowledgeable and researched enough to be considered an archaeologist in her own right, Evelyn "Evie" Carnahan is the main reason that everyone survives at the end of The Mummy after Imhotep's curse is awakened.

Evie has a near-encyclopedic knowledge of Ancient Egypt and its practices and rituals, allowing her to keep her cool when she's kidnapped by Imhotep and made part of a demonic possession. Unlike stereotypical nerds in movies, she doesn't hide behind her books, but applies and leverages her intellectual curiosity.

Doc Brown - Back To The Future

Doc Brown holding battery terminals in Back to the Future with the Delorean in the background.

Doc Brown, the beloved mad scientist from the Back to the Future franchise, wasn't just a nerd because he was constantly babbling on about things no one else had any interest in - he was also a nerd because of his enthusiasm for the esoteric field of quantum physics.

RELATED: Back To The Future: 10 Reasons The Original Was Ahead Of Its Time

Like many nerds, Doc Brown knows a lot about his area of expertise and likes to share his research and discoveries. Unlike most nerds, he discovers a way to make time travel possible (ala a flux capacitor), making him a revered figure in both '80s cinema and nerd fandoms everywhere.

Shuri - Black Panther

Shuri (Letitia Wright) in Black Panther wearing her orange tunic

The STEM-obsessed, tech-genius younger sister of T'Challa (Black Panther), Shuri is introduced as a Q-like figure that rattles off jargon and hooks her big brother up with high-tech equipment to take on the enemies of Wakanda. In fact, if it wasn't for Shuri, the mythical African nation wouldn't have such strong defenses.

Unlike a lot of nerds, Shuri exudes confidence, and doesn't dumb herself down to make anyone around her more comfortable - not even the king! Not only does she steal whatever scene she's in (which isn't easy, given the solid acting and kaleidoscopic splendor of Black Panther), she also saves the day with some truly amazing gadgets and weapons. It's no wonder Shuri got her own comic book (every nerds' dream) - she's the nerd everyone wants to emulate.

NEXT: The Big Bang Theory: 5 Things It Gets Right About Nerd Culture (& 5 It Got Wrong)