Being funny is easy. Telling a funny joke is hard as hell. Don’t believe me? Ask a group of people who the resident comedian is, and ask him or her to tell you a joke. Chances are they will stumble their way through it, earning a few awkward laughs in the process.

It sounds simple when you put it down on paper: Stand up in front of an audience, crack jokes, and get some laughs. Easy enough, right? It’s not.

Unlike the rest of us, who can play off of others in a social setting — cracking a joke at a friend’s expense, or ribbing on a buddy — a comedian has to carry the show on his own.

Related: These veterans prove that military life can be a laughing matter »

We asked Steve Mazan, a professional comedian who’s been performing for 17 years, to walk us through the anatomy of a joke. Mazan is a Navy veteran who sits on the comedy advisory committee for the Armed Services Arts Partnership and frequently performs for service members at home and abroad.

So, how do you structure a joke?

There are always at least two parts to a joke: the setup and punchline, Mazan explains. Occasionally there’s a third, called a tag, which is an extension of the punchline.

Here’s an example:

  • The setup: “My car insurance went up this year, but then I saw a company that said they could insure me for a fraction of what I’ve been paying.”
  • The punchline: “Unfortunately, that fraction was five-thirds.”

The punchline is always some turn that you’re not expecting based on the setup, says Mazan. In this case, a tag might be something like: “Of course, I signed up right away.”

For comedians playing off the audience, it’s not always obvious what the setup and punchline are going to be, but it’ll always be there.

“A lot of times, for guys working with the crowd, the setup and punchline will be given by the crowd,” says Mazan. “You’ll see comedians ask, ‘What do you do for a living?,’ and the punchline will be based on whatever the audience member says.”

Setting up a joke may seem straightforward, but how do you know it’s a good one?

You need to tell jokes for your audience, not for yourself.

“You always write stuff that you think is funny for yourself,” says Mazan. “The difference is finding out the stuff that the audience thinks is funny. That’s the job of the comedian. The extra step that a comedian takes is going on stage with it and making it funny for an audience.”

Everybody knows a funny guy in the office, but that doesn’t mean he’s going to be a great comedian.

“That’s why some people who were the class clown in high school or the funniest guy in the office, they don’t transfer well to the stage because they haven’t learned how to do that yet,” Mazan notes.

In the case of the office funny guy, he may have everyone rolling over with laughter at work, but that’s because his colleagues know the context. If he were to walk up on stage and start cracking jokes about his boss, it wouldn’t translate as well because the audience doesn’t know the subject matter, explains Mazan.

So how do you know your joke will translate well during an onstage performance?

You have to test your material.

“For comedians, I’ve heard different numbers, like one out of three jokes they write transfers to the stage,” says Mazan, who quipped that his ratio might be closer to one out of ten.

“If everything you wrote was good enough to hit the stage, you’d have hours and hours of material, but there’s only so much that translates,” he says.

“I have a three strikes rule,” says Mazan. “You take it and tell it three times on stage before you know if it’s worthy. If it ever dies three times, then I know. There’s some little magic that you just never know if it’s going to translate to the stage in the same way.”

Watch Steve Mazan perform on the Late Show with David Letterman.