Make no mistake: Identities will be mistaken in “The Comedy of Errors” at the Shakespeare Theatre. (SCOTT SUCHMAN/SCOTT SUCHMAN)

In the theater world, the dividing line between comedy and drama is best illustrated by a kick in the nuts.

“When a man is kicked in the groin in a realistic fight [onstage], the man is going to buckle over. There may be a low moan or no sound at all because the pain is so, so intense,” says David Leong, fight choreographer for The Shakespeare Theatre Company’s current production of “The Comedy of Errors.” “When someone is kicked and the man shrieks in a really high pitch, the reason we laugh is because of the sound. We know that the person isn’t really hurt.”

No nuts get kicked in Shakespeare’s play, but there is enough action to keep Leong on his toes. The story follows two sets of twins and their respective slaves, who are also twins, as they end up in the city of Ephesus on the same day. It all adds up to a lot of mistaken identities, frantic running around and slapstick humor.

It’s Leong’s job to make sure that all of the physical conflict of the play conveys comedy, not pain. And that starts with the reason a character is smacking someone in the first place.

“In a real fight, my intention is to hurt you,” Leong says. “In a comedy fight, I’m only beating you because I need you to do something for me.”

While staged dramatic and comedic fights do share some of the same physical language — like a kick in the family jewels — “there are a different set of moves” for comedy, Leong says. “What’s funnier to watch: someone being kicked in the ass or someone being kicked in the face?”

And not just any kick in the ass will do. To be funny, it has to be delivered with precision. “Comedy fights are way, way harder than other fights,” says Leong, who also choreographed the company’s summer staging of “Romeo and Juliet.” “They take more rehearsal because if the timing is off literally by a millisecond, it’s not going to be funny.”

Depending on how it’s delivered, a swift kick to the crotch can prompt a big laugh from the audience, or it might have all the men in the theater doubling over in sympathetic pain. One thing is certain, though: Whether the onstage fight is for shocks or for laughs, the gentleman on the receiving end should definitely wear a cup.

Shakespeare Theatre’s Lansburgh Theatre, 450 Seventh St. NW; through Oct. 28, $59-$118.