Comma Before Which | Rules & Examples

“Which” is a relative pronoun used to introduce a relative clause. Whether you need a comma before “which” depends on which kind of relative clause it introduces:

  • You need a comma before “which” when it introduces a nonrestrictive clause: a clause providing extra information that isn’t essential to the sentence’s meaning.
  • There’s no comma before “which when it introduces a restrictive clause: a clause that couldn’t be removed without changing the sentence’s meaning.
Examples of when to use a comma before “which”
“Which” introducing a nonrestrictive clause (comma) “Which” introducing a restrictive clause (no comma)
My car, which is a blue Ford Focus, was stolen last week. The car which was reported stolen was a blue Ford Focus.
I can’t wait for Christmas, which is my favorite holiday. The subjects which I struggle most with are chemistry and history.
Tip
The easiest way to check whether a comma is needed is to see what the sentence looks like without the “which” clause:

  • If it still expresses the same meaning (e.g., “My car was stolen last week”), you need the comma.
  • If it means something less specific (e.g., “The car was a blue Ford Focus”; what car?), no comma is needed.

Instantly correct all language mistakes in your text

Be assured that you'll submit flawless writing. Upload your document to correct all your mistakes.

upload-your-document-ai-proofreader

Comma before “which”: Nonrestrictive clause

“Which” is most commonly used to introduce extra information that isn’t essential to the meaning of the sentence. This kind of “which” clause is called a nonrestrictive clause or a nonessential clause. It’s always set off from the rest of the sentence by commas.

You can tell that a “which” clause is nonrestrictive if it can be removed without affecting the basic meaning of the sentence:

    • My grandmother’s house, which stands on top of the hill overlooking town, was built over a century ago.
    • My grandmother’s house was built over a century ago.

    The sentence still makes the same basic statement without the “which” clause. The subject is clear without the extra information, so it’s still obvious what house is being referred to: the one belonging to the speaker’s grandmother. Therefore, the clause must be surrounded by commas.

    Note that if the “which” clause appears in the middle of the sentence, you need a comma  at the end of the clause as well as at the beginning. Don’t forget the second comma:

    • I drank a cup of coffee, which helped to wake me up and went to work.
    • I drank a cup of coffee, which helped to wake me up, and went to work.

    The only proofreading tool specialized in correcting academic writing - try for free!

    The academic proofreading tool has been trained on 1000s of academic texts and by native English editors. Making it the most accurate and reliable proofreading tool for students.

    Try for free

    No comma before “which”: Restrictive clause

    “Which” is sometimes used instead to introduce a restrictive clause (or essential clause): a clause that’s necessary to express the sentence’s meaning.

    This kind of “which” clause is needed to define what you’re referring to. It can’t be removed without making the sentence’s meaning unclear or much less specific. Restrictive clauses must not be set off by commas.

    Check whether a clause is restrictive by seeing what the sentence looks like if you remove it:

    • The genre of music which I like best is R&B.
    • The genre of music is R&B.

    The sentence without the “which” clause no longer makes any clear statement. It’s now unclear what the subject “the genre of music” refers to. What genre of music? So the “which” clause is restrictive and should be written without commas.

    Which vs. that

    In US English, most style guides recommend using “that” instead of “which” to introduce a restrictive clause. So the example above would become “The genre of music that I like best is R&B.”

    This rule is useful because it more clearly distinguishes restrictive clauses from nonrestrictive clauses. And “that” is never used in nonrestrictive clauses (i.e., “My car, that is a blue Ford Focus, was stolen last week” is not grammatically correct), so the distinction is logical.

    You should follow this rule if you’re writing in US English. It has the added bonus of removing the confusion about when to add a comma: if you only use “which” nonrestrictively, you’ll always add a comma before a “which” clause.

    • The historical period which fascinates me the most is the Renaissance.
    • The historical period that fascinates me the most is the Renaissance.
    Note
    In UK English, this rule is generally not followed. “Which” is commonly used restrictively (“music which I like …”) without any objections, although “that” is still more common. “Which” is seen as a more formal option without any difference in meaning.

    However, “that” is still never used nonrestrictively, the same as in US English, so a distinction is still made between the two words. There’s no problem with following the US rule in UK English anyway; it will never lead you to make a mistake and generally makes your writing smoother.

    “Which” in questions

    “Which” is also used as a wh-word (specifically, an interrogative pronoun or interrogative determiner) to introduce a question. In a direct question, it appears at the start, so there’s obviously no need for a comma before it, and you also should not add a comma after it.

    Examples: “Which” in direct questions
    Which would you like, tea or coffee?

    Which color do you prefer for the dress?

    “Which” is also used in indirect questions—sentences that don’t end in question marks but still implicitly ask a question or refer to a question asked in some other context. Again, no commas should be added before or after “which” in this context.

    Examples: “Which” in indirect questions
    I wonder which is more popular—tea or coffee.

    She asked me which color I preferred for the dress.

    “Which” after a preposition

    “Which” also commonly appears directly after a preposition (e.g., “in which,” “between which,” “with which”). You should never place a comma between the preposition and “which,” and there’s also no need for a comma after “which” in these phrases.

    You do have to add commas around the whole “which” clause if it is nonrestrictive. The rules are the same as those described earlier, except that the comma appears before the preposition, not directly before “which.” And, as above, no commas are needed in a restrictive clause.

    Examples: “Which” preceded by a preposition
    Our next class, before which you should complete the assigned reading, takes place on Friday.

    I sometimes miss the town in which I grew up.

    Note
    In this context, the “which” vs. “that” distinction discussed above does not apply. You always need “which” after the preposition, regardless of the type of clause. Phrasings like “the town in that I grew up” are wrong.

    The only proofreading tool specialized in correcting academic writing - try for free!

    The academic proofreading tool has been trained on 1000s of academic texts and by native English editors. Making it the most accurate and reliable proofreading tool for students.

    Try for free

    Is there ever a comma after “which”?

    It’s usually wrong to insert a comma after “which.” In most cases, there’s no reason to do so:

    • Jane went to the grocery store, which, was just around the corner from her house.

    The only context where you should add a comma after “which” is when it’s followed by an interrupter—a phrase that interrupts the sentence to qualify or emphasize some part of the statement. Interrupters should be set off with commas on both sides.

    Examples: “Which” followed by an interrupter
    Jane went to the grocery store, which, conveniently enough, was just around the corner from her house.

    I’ve been working on this for hours, which, for all intents and purposes, has gotten me nowhere.

      Worksheet: Comma before or after “which”

      You can test your knowledge of when you need a comma before or after “which” with the worksheet below. Just add commas wherever you think they’re needed to the example sentences, and then check them against the answers provided.

      1. My aunt’s house which is in Boston is quite spacious.
      2. The poetry which I like best is from the Romantic era.
      3. Jan visited Vietnam last year before which he had never traveled outside Europe.
      4. The new policy leads to misunderstandings and conflicts which helps nobody.
      5. I’m not sure which way to go.
      1. My aunt’s house, which is in Boston, is quite spacious.
        • Commas are needed before and after the nonrestrictive clause “which is in Boston.” The clause is nonrestrictive because it could be removed without affecting the sentence’s basic meaning: the house is already clearly identified without this clause—it’s the one belonging to the speaker’s aunt.
      1. The poetry which I like best is from the Romantic era.
        • No commas are needed around the restrictive clause “which I like best.” The clause is restrictive because it is needed to identify what the statement is about—otherwise it would just refer to “the poetry.” Note that most style guides recommend writing “that” instead of “which” in restrictive clauses (“The poetry that I like best”).
      1. Jan visited Vietnam last year, before which he had never traveled outside Europe.
        • A comma is needed before the nonrestrictive clause “before which he had never traveled outside Europe.” The comma comes at the start of the clause, not immediately before the relative pronoun “which” but before the preposition “before.”
      1. The new policy leads to misunderstandings and conflicts, which helps nobody.
        • The “which” clause here is again nonrestrictive, so you need a comma before it. This clause modifies the whole sentence (it could be paraphrased as “This situation helps nobody”). If you left out the comma, it might initially appear to modify “conflicts,” which isn’t correct.
      1. I’m not sure which way to go.
        • This sentence is an indirect question in which “which” functions as an interrogative determiner. There are no commas before or after “which” when it’s used in this way.

        Other interesting language articles

        If you want to know more about commonly confused words, definitions, common mistakes, and differences between US and UK spellings, make sure to check out some of our other language articles with explanations, examples, and quizzes.

         

        Sources in this article

        We strongly encourage students to use sources in their work. You can cite our article (APA Style) or take a deep dive into the articles below.

        This Scribbr article

        Caulfield, J. (2023, March 21). Comma Before Which | Rules & Examples. Scribbr. Retrieved January 8, 2024, from https://www.scribbr.com/commas/comma-before-which/

        Sources

        Butterfield, J. (Ed.). (2015). Fowler’s dictionary of modern English usage (4th ed.). Oxford University Press.

        Garner, B. A. (2022). Garner’s modern English usage (5th ed.). Oxford University Press.

        Is this article helpful?
        Jack Caulfield

        Jack is a Brit based in Amsterdam, with an MA in comparative literature. He writes for Scribbr about his specialist topics: grammar, linguistics, citations, and plagiarism. In his spare time, he reads a lot of books.