When to Use a Comma Before “Which”

The word “which” has a few different use cases in the English language. It’s often used to identify one thing amongst a larger set. The word can be used as part of a nonrestrictive phrase, restrictive phrase, or prepositional phrase, and it can be used as an interrogative word. Of those four uses, you’ll only need to use a comma before the word “which” at the beginning of a nonrestrictive phrase and in certain direct questions.

Your writing, at its best

Compose bold, clear, mistake-free writing with Grammarly's AI-powered writing assistant

Are You Asking a Question?

When you use the word “which” as part of a question, the word could be considered an interrogative pronoun. You’re asking someone to specify one or more items from a definite set. 

Examples:

  • Which flavor is your favorite? 
  • Which is your favorite?

When you use “which” to ask a simple question, you don’t need a comma. 

You also don’t need a comma before “which” when it’s used as part of an indirect question. An indirect question has been rewritten in a declarative style that doesn’t require a question mark. 

I wondered which is your favorite.

In the case of an indirect question, as in the example above, no comma should be used. On the other hand, when a direct question appears within a longer sentence, it should always be set off by a comma. 

Could you tell me, which is your favorite?

In the example above, the direct question must be set off from the rest of the sentence.

You also need a comma before an interrogative “which” when the word appears in dialogue. That has more to do with the formatting of dialogue than with the word “which”. Even if you replace “which” with another word, you would still need the same formatting for any piece of dialogue. 

She asked, “Which is your favorite?”

He answered, “I don’t know.”

Using “Which” in a Prepositional Phrase

“Which” is frequently used as the object of a prepositional phrase. Keep an eye out for sentences that have a preposition before the word “which,” since that construction indicates that you do not need to use a comma. Common prepositions include: above, across, against, along, among, around, at, before, behind, below, beneath, beside, between, by, down, from, in, into, near, of, off, on, to, toward, under, upon, with, and within. 

  • That was the park at which he lost the game. 
  • I saw a play in which the main character spoke Japanese. 
  • That is a subject of which I am ignorant. 
  • The country to which I moved was across the international dateline. 
  • The high school from which I graduated was highly ranked. 

When you use “which” after a preposition, you won’t need an additional punctuation mark. 

Using “Which” in a Nonrestrictive Clause

Often, the word “which” appears as part of a clause that isn’t essential to the meaning of the sentence. For instance, the word might appear as part of a parenthetical, explanatory phrase. Parenthetical phrases can easily be removed from the sentence without changing the meaning. They should be identified with a pair of commas. 

Figure skating, which I started at age five, has always been my favorite sport. 

You could easily remove the nonrestrictive clause from the sentence without changing the meaning. 

Figure skating has always been my favorite sport. 

You may also come across the word “which” used in a non-defining relative clause. In this context, “which” introduces a phrase that gives extra information about a person or thing. 

He studied French, which was a subject that he enjoyed.

In the sentence above, the relative clause explains more about the word “French,” but it’s not essential information. Non-essential, nonrestrictive clauses should be set off from the rest of the sentence with a set of commas. If the non-essential clause appears at the end of the sentence, you would only need one comma to set it apart from the rest of the sentence.

Using “Which” in a Restrictive Clause

In other cases, a relative clause may be essential. In those circumstances, we call it a defining relative clause. Often, you can identify a defining relative clause by asking yourself by asking yourself, would I be able to replace “which” with “that”? 

The topic which I enjoy the most is art history. 

The topic that I enjoy the most is art history.

Also, ask yourself whether the phrase is essential. When you remove the phrase “which I enjoy the most,” do you change the meaning of the sentence?

The topic is art history. 

In this case, the meaning changes when you remove the relative phrase. For both of those reasons, we know that “which I enjoy the most” functions as a restrictive phrase in this case, and it therefore does not require commas. 

The example above uses “which” to introduce a defining relative clause. The phrase provides additional information that is essential to the sentence. Interestingly, in American English, people usually prefer the word “that” to “which” in a defining clause or any other restrictive clause. So, when in doubt, you may want to replace “which” with “that” and sidestep the question of whether or not to place commas entirely. Similarly, you could omit the relative pronoun when it’s used in this context. 

The topic I enjoy the most is art history. 

By making these two modifications—either replacing “which” with “that” or omitting the word “which”—you can avoid questions of comma usage. 

Do You Need Commas?

Look at the following sentences and try to determine whether you should use commas. You can find the answer key with proper punctuation below the quiz. 

Quiz

  1. Which toy is bouncier?
  2. She asked which laundry soap we use. 
  3. He asked “Which lamp do you like best?”
  4. They prefer the style guide which he advocated.
  5. He introduced a comma splice which is a common grammatical error.
  6. The Oxford comma which is named after Oxford University Press has long been the subject of arguments. 
  7. They want to know which dependent clause should be deleted? 
  8. She wanted to buy the ship which won the race.
  9. An apostrophe which identifies the possessive case should be used here.
  10. Independent clauses which are joined with a semicolon do not need a coordinating conjunction.

Answers

The answers in bold did not need any modifications. 

  1. Which toy is bouncier?
  2. She asked which laundry soap we use. 
  3. He asked, “Which lamp do you like best?”
  4. They prefer the style guide which he advocated. Alternative: They prefer the style guide he advocated.
  5. He introduced a comma splice, which is a common grammatical error.
  6. The Oxford comma, which is named after Oxford University Press, has long been the subject of arguments. 
  7. They want to know, which dependent clause should be deleted? 
  8. She wanted to buy the ship which won the race. Alternative: She wanted to buy the ship that won the race.
  9. An apostrophe, which identifies the possessive case, should be used here.
  10. Independent clauses which are joined with a semicolon do not need a coordinating conjunction. Alternative: Independent clauses that are joined with a semicolon do not need a coordinating conjunction.

Sources:

  1. https://dictionary.cambridge.org/us/grammar/british-grammar/relative-clauses-defining-and-non-defining
  2. http://www.cws.illinois.edu/workshop/writers/restrictiveclauses/
  3. https://www.dictionary.com/e/that-vs-which/
  4. https://owl.purdue.edu/owl/general_writing/punctuation/commas/extended_rules_for_commas.html
  5. https://grammar.collinsdictionary.com/us/easy-learning/interrogative-pronouns