When to use a comma before the word “but”
A comma should precede a conjunction separating two independent clauses.
What it means
When you put a “but” between two phrases that could reasonably be made into two sentences, there should be a comma.
He went to the store, but she stayed home.
1. He went to the store. 2. She stayed home.
How to remember it
Use a comma only if the “but” has a noun (person, place, or thing) following it.
I hate turnips, but my mother insists on cooking them.
The comma never goes after the “but.”
It works the same for “and” and “or” when they’re used as conjunctions.