Place commas before and after parenthetical words or phrases:
Shakespeare’s longest play, Hamlet, is also his most popular play.
Penelope dislikes Arthur, who wears gaudy red suspenders, intensely.
My nephew, who makes Wookies out of Legos, deserves a hug.
Norman, wearing his pink spandex bike shorts, stretched out thoroughly before doing his heavy squats.
Parenthetical words and phrases add extra information to a sentence without altering its basic meaning.
But if a word or phrase provides necessary information, information that significantly restricts or limits the meaning of the sentence, do not place commas around it:
Shakespeare’s play Hamlet is set in Denmark.
Penelope intensely dislikes men who wear gaudy red suspenders.
Everyone who makes Wookies out of Legos deserves a hug.
The fellow wearing the pink spandex bike shorts is my trainer.
(Grammarians call clauses that restrict or limit the meaning of a sentence restrictive clauses. Restrictive clauses should never have commas around them because they are essential to the meaning of a sentence.)
So, for parenthetical commas, remember the following rule:
The distinction between extra and needed information can be a subtle one. When in doubt, try deleting the word or phrase to see whether the information it provides is merely supplemental or truly necessary to the sentence.
The above example sentences with parenthetical words and phrases, for instance, still make perfectly good sense after we remove those words or phrases:
Shakespeare’s longest play is also his most popular play.
Penelope dislikes Arthur intensely.
My nephew deserves a hug.
Norman stretched out thoroughly before doing his heavy squats.
But removing the essential phrases from the second group of example sentences drastically alters or impairs their meanings:
Shakespeare’s play is set in Denmark.
[Which of Shakespeare’s plays?]
Penelope intensely dislikes men.
[All men? Without the restrictive clause, Penelope becomes a misanthrope.]
Everyone deserves a hug.
[A much more sweeping statement than the original sentence.]
The fellow is my trainer.
[Lacking the restrictive clause, we don’t know which fellow.]
In some cases, a sentence will be grammatically correct with or without parenthetical commas:
1. The man with the wooden leg bought a Porsche 911.
2. The man, with the wooden leg, bought a Porsche 911.
Both sentences are correct, depending on the context. If there were many men who bought Porsche 911s but only one of them had a wooden leg, then the phrase provides needed information and should have no commas surrounding it. But if only one man bought a Porsche 911, then the information is parenthetical and requires commas around it.
In many cases, parenthetical commas are necessary to keep things clear for the reader:
Our customers must be at a minimum priority concerns for everyone.
Without commas before at and after minimum, a reader might read at a minimum priority as one phrase.