After more than 45 years as a comedian, Ryan Stiles knows what’s funny. The 66-year-old rose to prominence with his work on the improv show “Whose Line Is It Anyway?” before appearing on the hugely popular sitcoms “The Drew Carey Show” and “Two and a Half Men,” all while regularly touring as a stand-up. So it takes a lot to make the seasoned comedy veteran laugh.

“When you’re in the business, it’s sometimes hard to laugh at people because you’ve heard it all before. I’ve toured with the same guys for 30 years and we very seldom laugh at each other offstage,” Stiles says.

Polo Ralph Lauren Double Knit Jersey Quarter Zip Pullover worn by Bill (Ryan  Stiles) as seen in Leanne (S01E10) | Spotern

But while making “Leanne,” the new Netflix sitcom (premiering July 31) co-created and starring comedian Leanne Morgan, Stiles couldn’t help but laugh.

“In makeup, she’d just say stuff that cracked me up. She’s just a naturally funny woman. She’s going to be huge. She just appeals to so many different types of people.”

Stiles — who was born in Seattle and moved to Vancouver, B.C., at 11, before returning as an adult to Washington, where he lives now — initially saw Morgan’s comedy on YouTube.

The 59-year-old Morgan spent a lot of her life working odd jobs and raising her three children, before giving stand-up a try when she moved to San Antonio around 2001. In 2018, clips of Morgan’s stand-up repeatedly went viral, leading to her 2023 Netflix special, “Leanne Morgan: I’m Every Woman,” which became one of the streamer’s highest-watched comedy performances.

Leanne' Ending Explained: Do Bill and Leanne Get Back Together?

Unsurprisingly, Netflix looked to capitalize on Morgan’s success by offering her the chance to make her own sitcom, based on her material. During casting for “Leanne,” Stiles got a call from co-creator Chuck Lorre, the creator of “Two and a Half Men,” asking him to come and read for the role of Leanne’s husband, Bill. In “Leanne,” the couple have been married for 33 years, but her life is turned upside down when he leaves her.

For Stiles, one of the appeals of working on “Leanne” was that its characters were actually close to his age.

“I’m 66. Leanne is approaching 60. She is closer to my age than most comics. Plus I had been through a divorce a few years before. I have two kids around the same age as the kids on the show. She’s caring for her parents. People are going to see a lot of themselves in the show. It’s about getting through life and enjoying and supporting your family.”

For Stiles, shooting “Leanne” felt like a throwback to filming “The Drew Carey Show,” which was one of the most popular shows on television when it ran between 1995 and 2004.

“It’s a four-camera show (as compared to single-camera), which people don’t do anymore. I love working in front of a live audience. It’s just a great feeling doing a sitcom. I always hate it when the filming day’s over.”

The only slight concern Stiles had was that he’s more used to improvising than “remembering lines and hitting marks.” (“I usually just go out and make up stuff,” he quickly added. “I had to get back into that structure again.”)

Meet the Real-Life Loves of the 'Leanne' Cast

Luckily, Stiles was surrounded by comedy pros during filming. Along with Morgan, Kristen Johnston (“3rd Rock From the Sun”), Celia Weston (“Alice”), Blake Clark (“Home Improvement”) and Graham Rogers (“Atypical”) all star, with Tim Daly (“Madam Secretary”) and Jayma Mays (“Glee”) supporting.

“I remember with Drew, it was his show, but he was smart enough to put funny people around him,” Stiles says. “Leanne is the same way. What you see of her on TV is what she is.”

When Stiles isn’t shooting sitcoms down at the Warner Bros. lot in Burbank, Calif., or touring the country performing stand-up, he can be found at his home near Lake Samish, south of Bellingham.

“I grew up in West Seattle near the beach,” Stiles says. “My dad was a fisherman. I can never live far away from the water. I just love the Pacific Northwest. It’s my safe haven. I had to leave California because there are no seasons.”

After getting his start in comedy in Vancouver in 1979, Stiles spent the next seven years performing in the city and writing for various television shows. In 1986, he joined the renowned Second City comedy ensemble in Vancouver, before moving to Toronto and then Los Angeles to work with the company.

After returning to Washington in the 2000s, Stiles noticed there wasn’t a comedy club nearby to perform at. So he opened one himself. The Upfront Theatre in downtown Bellingham was open for 18 years, until Stiles had to close it down in 2020, a fallout of COVID. Thankfully, the organization reopened in 2021 as a nonprofit (under the same name but at a new location in Bellingham), so Stiles is able to perform there whenever he needs to. In fact, it’s where he hones his material as he performs more than 100 shows a year around the country.

“It’s what I love to do,” says Stiles, who admits that he’s not given any thought to quitting. “It’s just about entertaining people. I always have people ask, ‘When are you going to retire?’ But what am I going to do when I retire? This is what I enjoy doing.”