– “The Big Bang Theory,” which concludes its 12-season run Thursday, is being toasted as one of the most successful sitcoms in TV history. But don’t overlook its more noble accomplishment: reducing the number of geeks who get stuffed into school lockers.

“I still think we made nerdy cool,” said Kaley Cuoco, who portrays the unsinkable Penny, a role currently earning her (and most of her cast mates) a cool $1 million per episode. “I think a lot of people thought this was going to be a really silly show with two nerds living next to a hot girl. And we have completely changed and outgrown that. These characters have left a mark on people’s hearts. They were the underdogs at the beginning. Now they’ve totally come out on top.”

Cuoco had just wrapped up rehearsals last February with her fellow actors, including her on-screen husband Johnny Galecki and a barefoot Mayim Bialik, all scampering from set to set with scripts in hand. They were closely trailed by a pack of executives and crew members offering uproarious laughter that would be provided later in the week by a studio audience.

“This is where the magic happens,” whispered Peter Roth, chief executive of Warner Bros. Television, on hand to emcee a ceremony that would officially rename the stage after the show, a rare honor previously bestowed on “Two and a Half Men,” “ER,” “Friends” and “Ellen.”

“I stopped next door when they were dedicating the ‘Two and a Half Men’ stage and thought about what it was going to be like when we were at that point or if we’d get to that point,” said Galecki, chatting in the show’s main living room, furnished with Storm Trooper figurines, Rubik’s Cube coasters and a Dungeons & Dragons starter kit. “You wonder about it for so long that when it happens, it feels surreal.”

The suits didn’t always think “Big Bang” was destined for greatness.

Creators Chuck Lorre and Bill Prady originally shot a 2006 pilot in which two Pasadena physicists, played by “Roseanne” vet Galecki and a relatively unknown Jim Parsons, are rattled by a mean girl named Katie (Amanda Walsh) who finagles her way into a spare bedroom in their apartment.

CBS executives passed, but thought enough of the effort to give the producers a second chance.

“That almost never happens,” Galecki said. “They were very wise.”

The producers scrapped the entire cast, with the exception of Galecki and Parsons, and replaced them with actors who were given more vulnerable characters — like Penny, a Midwesterner who knows more about Madonna than Madame Curie, and Raj (Kunal Nayyar), a Cal Tech colleague who can’t speak to women until he’s thrown back a few drinks.

“We saw where we had really fallen short, where we really hadn’t done our job,” said Lorre, whose credits — ”Dharma & Greg,” “Cybill,” “Two and a Half Men,” “Mom” — earned him the nickname the King of Sitcoms. “We had to broaden the show in a legitimate way, like by having female scientists. Of course. Duh.”

Getting it right

The reshot pilot made in onto the 2007 fall schedule. But “Big Bang” didn’t immediately explode, failing to crack the top 30 during its first two seasons. The series only found a wide audience when it moved to Thursdays, where it took full advantage of dwindling interest in its main competition, the once dominant “American Idol.”

For the past eight years, it’s been TV’s highest-rated comedy.

“One thing that happens with a show that’s been on for a while is that the audience gets to know the characters, maybe even better than you do,” Lorre said. “Their behavior, their mannerisms become abbreviated because the audience is already ahead of you.

“Shows work when they have an underlying theme of affection and family, whether it’s biological or based on friendship,” he said. “Even on ‘Seinfeld,’ the characters may have been constructed to be abrasive, but they ate together, they went on adventures together and when they had romantic difficulties, they talked to each other. It was inviting. I always wanted to hang out with Cliff and Norm at the bar on ‘Cheers.’ It’s that community element that everyone wants.”

Prady said he knew the show was finally resonating with audiences when his mother stopped getting the title wrong.

“For a long time, it was ‘The Big Blog Theory’ or ‘The Big Boys Theory,’ ” he said. “Around the third season, she started getting it right.”

The Emmys would react by honoring Parsons as best comedic actor four times — his character’s catchphrase, “Bazinga!” is this generation’s answer to J.J.’s “Dyn-o-mite!” on “Good Times.”

Everyone from Bob Newhart to the late Stephen Hawking got in on the fun. The prequel, “Young Sheldon,” immediately became TV’s second-most-watched sitcom with its 2017 premiere and has been renewed for at least two more years. Its season finale will also air Thursday, along with a one-hour retrospective special on the legacy of “Big Bang.” The cast will also take one final bow on that evening’s episode of “The Late Show With Stephen Colbert.”

Future spinoffs are not out of the question. Cuoco jokingly suggested one that revolves around Raj’s dog, Cinnamon.

The show’s popularity makes it all the more difficult for the cast to bid farewell.

“I was just wondering the other day what it was like to be on ‘Friends’ and then realized, ‘Oh, wait. We’re the same thing,’ ” Nayyar said. “It’s overwhelming to comprehend the impact the show has had. It feels like make-believe sometimes.”

The series’ end was triggered by Parsons’ decision to focus more on other projects. Lorre also seems content to move on.

“This feels like a wonderful way to take a bow and go before people start throwing fruit at us,” said Lorre, who recently won his first Golden Globe in nearly 25 years for creating Net­flix’s “The Kominsky Method.”

But Cuoco admits she was more than prepared to give viewers another 280 episodes.

“I would have done 20 more seasons, but life has to go on,” she said. “It’s good to go out on top.”