NBC's hit sitcom The Office is, without a doubt, one of the best television shows of this generation. The comedy pioneered many things, including the now widespread mockumentary format utilized by other shows, like Parks and Recreation, Modern Familyand What We Do In The Shadows (to name a few). Due to its documentary nature, as well as the number of great improv comics in the cast, many people assume that much of the show was improvised, but that's not true. Actually, according to Jenna Fischer (Pam) on the podcast she shares with Angela Kinsey (Angela), most of the show was scripted specifically to sound like improv, but very few of their moments were improvised.

RELATED: The Office: 10 Times Jan Was The Worst

That being said, on a show with that many acting and comedy powerhouses, it's only natural that a certain number of the scenes were, in fact, improvised in some way or another. Some of them made their way into the show, and the best ones are remembered by cast and audience alike.

Updated on April 28th, 2021 by Kristen Palamara: The Office has been off the air since 2013 but still stands as one of the most popular sitcoms and most of that has to do with its strong comedic cast. The entire cast had strong improvisational skills and were able to come up with moments and quotes on the spot during the show and if the scene worked it stayed in the episode. There are several surprisingly improvised moments throughout the beloved show that fans loved from Michael kissing Oscar to the opening credits, but fans may not know that these moments were unscripted.

The Return: Andy's "Roo Doo Doo Doo Doo"

Andy Bernard excited and screaming in The Office

Andy and Michael return to the office after their day out on sales calls in "The Salesmen" episode and Andy rambles on in the next continuation episode still trying to suck up to the boss as he usually did in his first few seasons.

Ed Helms came up with most of his rambling lines on the spot including one of Andy's first "Roo Doo Doo Doo Doo" moments that became part of the character right up until the finale when a crowd of people chant this at him.

Initiation: Dialogue Between Ryan And Dwight At The Farm

Ryan and Dwight at Dwight's farm in The Office

Dwight decides to initiate Ryan into the world of sales by taking him to his beet farm and making him do odd things throughout the day instead of actually taking him on a sales call.

A lot of the dialogue between Dwight and Ryan was improvised by Rainn Wilson and B.J. Novak from Dwight telling Ryan to plant a seed in the ground like how he'll plant a seed in Ryan to Dwight asking his cousin Mose where all their animals are.

Healthcare: Dwight Listing Fake Ailments

Dwight peering through the blinds on The Office

In the "Healthcare" episode, the employees, Jim in particular, decide to write down fake ailments that they're asking to be covered by their health insurance. Dwight gets upset as he realizes that most of the list is fake.

Rainn Wilson came up with most of the fake ailments on the spot as Dwight began to list off everything that was written down from "hot dog fingers" to a "nanorobot infection."

Valentine's Day: Michael's New York Tour

Micheal Scott traveling to New York in The Office

Michael travels to New York in the "Valentine's Day" episode and they shot Michael's scenes as he showed the crew around New York City. The team had to move quickly as Steve Carell continued to get recognized on the streets of New York.

Because of the time constraint, Carell had to come up with a lot of Michael's lines on the spot and comment on whatever was behind him in the shot at the time from Sbarro to Fiddler on the Roof.

Traveling Salesmen: Angela Leaving Jellybeans

The Office Character Angela's Actress Originally Auditioned For Angela Kinsey jenna Fischer

In the episode "Traveling Salesman," there's a small moment between Angela and Pam that's been revealed as an improvisation on Angela Kinsey's (Angela) part. Angela stands at Pam's desk waiting for Dwight to return making small talk with Pam while picking up dozens of jellybeans.

Once Angela sees Dwight return, Angela stops for a moment before leaving her desk and then says that she actually doesn't want any of those jellybeans and places them all back on Pam's desk before leaving. It's in character for Angela but was an improvisation from Kinsey.

Dinner Party: Jan's "I'm The Devil!"

An image of Jan blowing raspberries in The Office

"Dinner Party" is perhaps the most infamous episode of The Office there is (next to "Scott's Tots"), and with good reason - it's jam-packed full of those awkward, hilarious moments that make the show what it is. One of those smaller awkward moments was improvised: When Jan is telling a story about Michael, the two get into an uncomfortably tense banter.

In the middle, over her scripted line of "I guess that makes me the Devil," Melora Hardin (Jan) puts both her fingers up as horns and makes a raspberry sound. This was so unexpected and funny for Steve Carell that he laughs before he can keep talking - so the laugh you see Michael do in that scene is actually Steve Carell breaking character.

Gay Witch Hunt: The Kiss

Michael kisses Oscar in The Office

According to the Office Ladies podcast, in the scene where Michael kisses Oscar in an attempt to prove that he's cool with Oscar being gay, Michael was originally only supposed to hug Oscar. Upon watching the first few takes when filming, the writers and the director agreed that the scene was missing something. Steve Carell said he had it covered, and the next take was the one that made it into the show.

Nobody had any idea what was about to happen, so the reactions you see from Oscar and everybody else are 100% authentic shock from the actors. After the take, everybody agreed that it was just what the scene needed.

Women's Appreciation: Michael's Flasher Impression

Michael acting like a flasher on The Office

At the beginning of the season three episode "Women's Appreciation," Phyllis has a run-in with a flasher in the parking lot. Everybody in the office is super sympathetic and supportive...except for Michael. Thank goodness Phyllis is gone by the time he gets there, because of his response? Laughter. Steve Carell had fun with one of the takes, doing an "impression" of the flasher by putting his finger through the fly of his pants.

The bit even extends until Toby walks in. It was insensitive, and nobody in the room was laughing, but from the perspective of an audience member, that moment was pure gold.

Sexual Harassment: Sex Ed With Dwight And Toby

Dwight and Toby on The Office

In the episode "Sexual Harassment," while Michael is being bombarded with pleas from corporate to act more appropriately and the office is being terrorized by Todd Packer, Dwight goes to Toby to ask a few questions about the female anatomy.

 RELATED: The Office BTS Accident Dwight's Rainn Wilson Still Feels Guilty About

This intensely awkward conversation was almost entirely improvised on the part of Rainn Wilson (Dwight) to hilarious results. His ultra-specific and clueless questions are exactly in keeping with the kind of cringe-inducing humor you expect from The Office.

Office Olympics & Drug Testing: Dwight's Background

Dwight with his friends on The Office

Rainn Wilson is one of The Office's best improvisers, and many of his improvisations made the final cut into the show. A few of his early talking head moments actually became key parts of his character. In the episode "Office Olympics," after Michael retracts his invitation to have Dwight come live in his new condo (and pay rent), Dwight expresses relief, stating that he lives on a large beet farm.

Additionally, in "Drug Testing," as Dwight explains why he is so keen on finding the person who left a joint in the parking lot, he mentions offhand that his great-grandfather was Amish. Both of these were small improvisations at the time, but the writers loved them so much that they kept bringing them back up, eventually making them key tenets of Dwight's character.

Multiple Episodes: Sprinkles

Angela holding up a photo of her and her cat Sprinkles on The Office

Rainn Wilson isn't the only one who had a small improvisation become a key part of his character. At the beginning of season four where Angela breaks up with Dwight for euthanizing her cat Sprinkles against her wishes. That particular cat, and Angela's love of cats in general, all came from a small bit of Angela's background work from the first episode, in which she handed out invitations to her cat Sprinkles' birthday party.

Fellow cast members thought this was so funny that they would bring Sprinkles up from time to time, and eventually, she made it into an episode (even if it was only to die at the hands of a well-meaning boyfriend).

Money: Dwight Reaching For Jim

Jim trying to comfort a crying Dwight on The Office

One of the most touching moments in all of The Office is the one where Jim goes to comfort Dwight as he cries in the stairwell over his breakup with Angela. Jim kindly tells him that he wouldn't wish that feeling on anyone, including him. After a few moments, in his sadness, he reaches out to hug Jim...who is already gone.

RELATED: The Office: 5 Ways Dwight Changed Throughout The Series (& 5 Ways He Stayed The Same)

Though the scene itself was performed as scripted, that bittersweet moment at the end was an improvisation by Rainn Wilson, and it really did a great job to show both how hurt Dwight was, and how he really didn't hate Jim as much as he appeared to.

Performance Review: Dwight's Fitness Orb

Dwight sitting on a fitness orb on The Office

In the cold open for "Performance Review," Dwight is bouncing on what he proudly refers to as a "fitness orb," rather than simply sitting in his desk chair. After bragging for quite a bit about its many benefits to Jim, Jim nonchalantly asks how much the orb costs, then (upon hearing that it was not too expensive to replace,) gets up and pops it with a pair of scissors.

In the first several takes of this scene, when John Krasinski (Jim) popped the ball, it deflated slowly, and Rainn Wilson sank to the ground. On the very last take, however, it collapsed in half a second, and Wilson went with it. That was the take they used, and it cuts off right after because the cast immediately burst into laughter about five seconds later.

Half Of The Theme Song

The Office opening credits

Every theme song is improvised, in a sense, made up of whatever footage the editors deem as key to the show. However, The Office's theme song is improvised in a different sense. In the beginning, it was a very low-budget show, and they only filmed six episodes for their first season. As such, there wasn't a lot of footage they could use without giving the whole show away or being repetitive.

Luckily for them, to prepare for his role as Jim, John Krasinski had taken a trip to Scranton, PA before filming started in order to get a feel for it. The shots you see of Scranton in the opening theme are actually just videos that he had happened to take on his trip.

Michael's Last Dundies: 9,986,000 Minutes

Michael crying as the cast sings a goodbye song to him on The Office

In Steve Carell's penultimate episode on the show, "Michael's Last Dundies," the employees of Dunder Mifflin surprise Michael with a song about his time as their boss, set to the tune of "Seasons of Love" from Rent, as their way of telling him they love him.

This last scene wasn't unscripted, per se, but there was one person who didn't know about it: Steve Carell. This song was a surprise that the cast and crew put together for their beloved leading man to thank him for everything he'd done, and the smile on his face and the tears in his eyes during the song are touchingly, heart-wrenchingly real.

NEXT: The Office: Michael Scott’s 5 Best (& 5 Worst) Alter Egos