A comma separates the items of a list, sets off information the sentence does not need, follows an introduction, marks an interruption or the name of someone you address, and comes before a question tag. Above all, it keeps a sentence from being misread.
Commas confuse a lot of people, because many different situations decide when you should use one. Most people get the simple comma rules right, but beyond those, usage varies a great deal. There are clear rules for correct comma usage, but many people don't know all of them.
One big problem in learning to use commas correctly is that so many people get them wrong. When you read a professional writer, you can usually assume that the commas are correct. When you read something from your friends, family, or coworkers, it is quite likely that at least some of their commas are wrong. Every comma you see used (or left out) incorrectly makes it harder to tell right from wrong.
Here are the most common rules for correct comma usage.
1. Separate the items of a list
We have dogs, cats, turtles, fish, and birds.
The comma before and is optional. It is called the Oxford comma.
Commas also separate adjectives that each describe the noun on their own:
It was a long, hot summer.
However, if the adjectives build on each other to express a single idea, do not use commas:
A majestic bald eagle is held in the highest regard.
2. Set off clauses and phrases that are not essential
When a clause or phrase only adds extra information, and the sentence makes sense without it, put commas around it:
The dog, who is sometimes a little strange, was sleeping at the end of the sofa.
3. Set off an appositive
An appositive is a word or phrase that renames the noun next to it. Set it off with commas:
The original Superman movie, a 1978 classic, starred Christopher Reeve.
If the appositive is essential to the meaning, do not use commas:
The Christopher Reeve movie Superman is from 1978.
Here, the title is essential, because Christopher Reeve starred in more than one movie.
4. Set off an interruption
Words and phrases that interrupt the flow of a thought take commas:
The dog, of course, was sleeping.
By the way, I won't be home for dinner tonight.
5. Set off the name of someone you address
Did you like the movie, David?
6. Put a comma after an introduction
When a word or phrase at the beginning of a sentence introduces it, put a comma after it:
Several years ago, they met for the first time at the hot dog stand.
7. Put a comma before a question tag
A short question at the end of a statement is called a question tag. Put a comma before it:
You're not going to see the movie a second time, right?
8. Use common sense
The last rule is common sense. If parts of a sentence would be confusing when they are read together, use a comma to make your meaning clear:
As they walked into the house, in the shadows they missed the person who was lurking.
Without the comma, a reader would first take the house in the shadows as one phrase. For more cases, see these 17 comma rules.
Check the rest, too
Comma placement is only one part of writing correctly. If you go to the trouble of writing something, take a few moments to make sure that you also follow the rules of capitalization, italics, and basic grammar. The Spell Checker checks punctuation as well as spelling and grammar, so a final check takes only a moment.