The comma should be placed before "and" when it connects two independent clauses—clauses that each have their own subject and verb and could stand alone as sentences. For example: "I went to the store, and I bought some apples." However, no comma is needed before "and" when it connects two verbs or phrases that share the same subject, or when connecting two items in a list of only two items (e.g., "He runs and jumps."). Regarding commas before or after "or," the same rule applies: a comma is used before "or" only when connecting two independent clauses. There is generally no comma after "and" or "or" unless it is followed by an interrupter or parenthetical phrase that requires separation. For lists with three or more items, a comma (called the Oxford comma) is usually placed before "and" or "or" to clarify separation (e.g., "apples, oranges, and bananas"). This comma before "and" or "or" in lists is optional in some styles but commonly recommended in American English. In summary:
- Comma before "and" or "or" when joining independent clauses.
- No comma before "and" or "or" when joining verbs, phrases, or two items.
- Comma optionally before "and" or "or" in lists (Oxford comma).
- Comma after "and" or "or" only if followed by an interrupter.
This guidance applies broadly to English grammar and style conventions.