Whether you should use a comma before or after but depends on the sentence construction. Recognizing the structure of a sentence will help you identify when you should use it. A few tips will make this task easy. But remember, there is always that pesky exception the rule.
Let’s begin with an example of a complete sentence.
This simple string of words contains a subject, verb and object. It is also an independent clause. It can stand on its own without adding another word. Compare that one with another one.
It is also a complete sentence and an independent clause even though it doesn’t have an object as in the first example.
We can join the two clauses with a conjunction. These words function as joiners that link two sentences. They include words such as and, or and but. We can add a conjunction to our examples.
You’ll notice that we added a comma before but. That is because the two clauses are independent, making the comma necessary. You can test it by ending each clause with a period to see if it is a standalone sentence.
With dependent clauses, these strings are not complete and cannot stand on their own. They include phrases missing a part of a complete sentence. We can join the two clauses with a conjunction.
In this case, we didn’t add a comma because the phrase after but was a dependent clause. The bridge between the two clauses must be seamless, therefore, no comma before or after but.
There is one situation in which you will find a comma after but. It occurs in cases where the writer makes a deliberate choice for literary effect. That’s where interrupters come into play.
An interrupter does just what the name implies. It breaks a sentence flow with a word, phrase or clause for effect. Here’s an example.
The clause, if you must know the truth, stops the flow of the sentence to interject this point. As you can see, there is a comma after but. The punctuation with an interrupter is meant to offset it from the rest of the sentence. It will always have a comma before and after its placement to draw attention to its inclusion.
This goal of this sentence is to emphasize the unusual situation with an interrupter. In these cases, it’s helpful to understand the context to determine if the comma is necessary.
You should always use a comma before but when joining two independent clauses. A comma after but is only necessary if you’re using it as literary device to draw attention to something.