How do I know whether to use which vs. that in a sentence?
The difference between “which” and “that” is really about the clauses they form. Whenever there is a question of changing “which” to “that,” we should look at what kind of clause the word is a part of in order to make a decision.
“Which,” when used correctly, is part of a nonrestrictive clause, which is preceded or set off by commas. This clause is not essential to the meaning of the sentence, and can be taken out without changing the meaning. For example: “The dog sled race, which was grueling, took place two weeks ago.” The nonrestrictive clause “which was grueling” could be removed without doing any damage to sentence comprehension.
“That” is part of a restrictive clause that is not set off by commas. This clause is essential to sentence meaning, and can’t be removed. For example: “The dog sled races that take place in Anchorage are especially intense.” The restrictive clause “that take place in Anchorage” is essential to the sentence’s meaning, and is not set off by commas.
Therefore, if you take a look at the type of clause first and foremost, you’ll know if it needs a “which” or “that.”
But sometimes “which” doesn’t seem to require a comma. (“I wanted to ride the bike which is over there.”) In this example, “which is over there” seems to be necessary to the sentence and would be awkward with a comma before it.
Herein lies the source of your confusion, as “which” requires a comma when used correctly (except when it is being used as a pronoun, as in “Which leotard is best for equestrian vaulting?”). If you see a “which” without a comma before it in a sentence, an alarm bell should go off.
Your example should actually be using a “that”—”I wanted to ride the bike that is over there.” This is a restrictive clause, since what is defining the bike in the sentence is the fact that it is “over there.”
You can use “which” with a comma before it if the clause is not absolutely necessary. That is, if the main point about the bike in the sentence is not that it’s “over there,” but something else, like: “I wanted to ride the bike, which is over there, but then I saw the snake coiled around it.”
Rule of thumb: use “that” if the “which” in the sentence sounds funny with a comma in front of it or around the entire phrase.
* * *
Send your grammar and language questions to firstname.lastname@example.org. I’ll answer the best questions on my blog every month!