Should You Put a Comma Before While?

The rule on how to use commas before while is rather simple, but first, we must delineate between while as a conjunction and while as a noun. After we have done this, we will explain when you should use commas with while and when not to.

While as a Noun

In certain idiomatic expressions while can have the function of a noun. When it is used in such a way it has the meaning of a period of time. We are referring to expressions like for a while, in a while, a while ago, etc. In these cases while, or the entire idiom, never needs to be preceded by a comma.

He came to my house a while ago. ✔
He came to my house, a while ago. ✘
We’ll be staying for quite a while. ✔
We’ll be staying, for quite a while. ✘

While as a Conjunction

This is the most common use of while. When used as a conjunction, while can mean that something is happening at the same time, or used to contrast two things. This is where the use of commas is different. You don’t need to use a comma before the first while, but you do need to use one for the second case.
While When You Don’t Need a Comma
Don’t use a comma when while is connecting two clauses where the actions are happening simultaneously.

I didn’t stop dancing while the music was playing. ✔
I didn’t stop dancing, while the music was playing. ✘

A good rule of thumb is that if you can replace while with as and the meaning remains the same, you don’t need a comma.

The crazy guy was running while it was raining. ✔
The crazy guy was running as it was raining. ✔
The crazy guy was running, while it was raining. ✘

While When You Do Need a Comma

In cases where while is used to contrast two things, you should use a comma.

The bankers must be to blame that the price of beer is increasing, while the price of barley is falling. ✔
The bankers must be to blame that the price of beer is increasing while the price of barley is falling. ✘

The rule of thumb here is that if you can replace while with whereas, you need a comma.

I can’t stand seafood, while my sister loves it. ✔
I can’t stand seafood, whereas my sister loves it. ✔
I can’t stand seafood while my sister loves it. ✘

Using Commas Properly Avoids Ambiguity

There are certain cases where you can either put a comma before while or leave it out, and you will still be grammatically correct, but the meaning will change. Think about the message you wish to convey and use the comma appropriately. This is mostly a stylistic choice used for emphasis, so use it at your own discretion.

She was dancing while I was singing.
She was dancing, while I was singing.

In the first example the meaning is clear – the dancing and the singing were happening at the same time. In the second example you are intentionally emphasizing the contrast between the two actions. Whether or not the actions were happening simultaneously is of less importance. If you expanded the sentence, it could read something like:

She was dancing out of joy, while I was singing to pay our bills.


There are 3 types of while:

  1. While as part of an idiomatic phrase.
    He’s drunk and won’t be leaving for quite a while.
  2. While with the meaning of at the same time.
    I can do the dishes while you vacuum.
  3. While used for contrasting two things.
    I like the Powerpuff Girls, while he prefers the Rowdyruff Boys.

You don’t need a comma in examples 1 and 2 before while while in the third one you do. Did you notice the missing comma in the previous sentence? Good. Also, if you ever have a chance to correspond with the Queen, use whilst. Whilst is the formal form of while, especially in British English, and the same rules apply. Tell her we say hi.

Take a Sample of Our Work

We don’t expect you to take our word on the quality we
promise. Before deciding whether you want to work with us,
you can order a free 1000 word article to see what we offer.