Punctuating coordinating conjunctions correctly; put a comma before
Use a comma before the word “but” if it is joining two independent clauses:
Incorrect: Sophia is a good singer but she is an even better dancer
Correct: Sophia is a good singer, but she is an even better dancer.
If but is not joining two independent clauses, leave the comma out.
Incorrect: My teacher is tough, but fair.
Correct: My teacher is tough but fair.