In a list of three or more items, do not use the comma (called serial comma or Oxford comma) before the word “and” or “or,” unless needed for clarity: red, white and blue
When the subject of the two clauses is the same and is not repeated in the second: She is working on new research and hopes to publish soon.
Before “because” (unless you need the comma to prevent confusion because your sentence could have two meanings)
The Okies had to leave their farms because the drought conditions had ruined their farms.
I knew that President Nixon would resign that morning, because my sister-in-law worked in the White House. (Without that comma, the sentence says that Nixon’s resignation was the fault of my sister-in-law.)
Before “such as” or “including” when a sentence wouldn’t make sense without the words that follow: I love moments such as those.
At the start of an indirect or partial quotation: She said the vaccine will be ready in the next year or two.
In names of people with Jr. and Sr.: John Smith Jr.
Do use commas
Before the word “and” or “or” in a list of three or more items when there is a compound list of things and the last part includes the word “and”: The colors in the image were purple, orange, green, and white and gray mix.
In direct address: Sarah, please turn on the fume hood.
To separate a series of adjectives equal in rank: If the commas could be replaced by the word and without changing the sense, the adjectives are equal: a thoughtful, precise manner or a dark, dangerous street
To separate duplicated words that otherwise would be confusing: What the problem is, is not clear.
To set off someone’s age: Maude Findlay, 48, was present.
With “yes” and “no”: Yes, I will be there.
With full dates: When a phrase refers to a month, day and year, set off the year with a comma: November 5, 2016, is my thirtieth birthday.
With introductory clauses and phrases: When he had tired of the mad pace of New York, he moved to Dubuque.
(No comma needed when phrase is fewer than four words: Outside you’ll find the equipment.)
Before coordinating conjunctions (FANBOYS: for, and, nor, but, or, yet, so) that join two independent clauses that could stand apart as separate sentences: She was glad she had looked, for a man was approaching the house.
After names of states and nations used with city names: His journey will take him from College Station, Texas, to Fargo, North Dakota, and back.
For any number containing four of more digits: 4,000 or 10,000
To set off credentials: Jane Doe, PhD, is a new professor.